Ιστορίες προγραμματιστικής τρέλας


Retired Admin
19 Ιαν 2006
Το Gamasutra μαζεψε μερικες ενδιαφερουσες ιστοριες games-προγραμματιστων περι bugs και παραξενων τροπων επιλυσης τους.

Shoot Me From My Good Side
Around four years ago I was working as a programmer on a multiplatform PlayStation 2, Xbox, and GameCube release. As development was coming to a close it should come as no surprise that some code hacks started creeping into the game to get the title shipped. The PS2 version in particular had a late, extremely hard-to-track-down issue: A long soak test of the player character standing still in the first level of the game would cause it to periodically crash. Unfortunately, the crash was limited to disc-only retail builds that included no debugging information. With fears of a Sony technical requirement check (TRC) failure looming we worked hard to find a solution.

To narrow down the issue we continuously rendered a border around the edge of the screen with a different color for different sections of the code. For example, blue represented render setup, and green was the player control update. Because the crash was intermittent, the lead engineer on the title and I would manually burn a bunch of discs and start them up on an array of PS2s. (Keep in mind this was an independent developer, with no IT team or fancy disc burning machines.) The test cycle -- between making a code change, burning discs, deploying, and waiting to whittle down some approximation of where the crash was -- took hours. It was the eleventh hour of development and there was a fixed number of these test cycles we could conduct.

Between stretches of passing the time over the weekend in the office with World of Warcraft while waiting for a crash, someone noticed that the game didn't crash if you rotated the camera 90 degrees to the right. Initially, the programming team correctly waved this off as some kind of fluke that was masking the underlying bug. This isn't the type of "fix" that would repair the root cause of a crash. That didn't stop us from shipping it though! As we ran out of time, we created the final PS2 disc with a rotated camera at level start -- the other two platforms were already on track -- and submitted everything. The game passed all the platform holders' TRC tests and was shipped to market on time.

I wouldn't call this a "coding trick," but it was definitely "dirty." The mysticism of the fix is disconcerting to this day, but thankfully I never heard of any reported user issues.

- Mark Cooke
Περισοτερα ΕΔΩ


ΚickOff World Champ 2013
16 Οκτ 2008
Από ιστορίες, άλλο τίποτα. :) Ιδίως τα "παλιά" χρόνια... τι να πούμε τώρα για προβλήματα που γράφουμε σε 2GB RAM και όποτε κολλάει το μυαλό μπαίνουμε στο internet και σε λίγα λεπτά βρίσκουμε λύση;

Πρόχειρα μου έρχεται το εξής: Τελειώνοντας το Other Worlds, ήθελα να φτιάξω μια οθόνη με τους τίτλους τέλους. Πως όμως θα το έκανα αυτό απλά και εύκολα; Σχετικό module δεν υπήρχε τότε, οπότε σκέφτηκα το εξής: Έφτιαξα ένα τεράστιο room ύψους αρκετών χιλιάδων pixels από πάνω μέχρι κάτω, το οποίο δεν ήταν τίποτε άλλο από τα credits γραμμένα με λευκά γράμματα σε μαύρο φόντο. "Μπαίνοντας" σε αυτό το δωμάτιο αλλάζω την όψη του βασικού χαρακτήρα σε αόρατο sprite, και τον βάζω να ξεκινήσει από το πάνω μέρος του δωματίου μέχρι το κάτω.

Έτσι ο παίκτης βλέπει μια οθόνη credits να σκρολάρει στην οθόνη του, χωρίς να γνωρίζει ότι στην ουσία παρακολουθεί ένα αόρατο ανθρωπάκι να κάνει οδοιπορικό σε ένα τεράστιο δωμάτιο. Η ιδέα μου άρεσε τόσο πολύ που την χρησιμοποίησα και στο Diamonds in the Rough.


9 Δεκ 2006
Χάχα κορυφαίο άρθρο, το είχα ξαναδιαβάσει παλιότερα. Αυτό που μου έχει μείνει είναι το σχόλιο ενός προγραμματιστή του wing commander για dos:

Back on Wing Commander 1 we were getting an exception from our EMM386 memory manager when we exited the game. We'd clear the screen and a single line would print out, something like "EMM386 Memory manager error. Blah blah blah." We had to ship ASAP. So I hex edited the error in the memory manager itself to read "Thank you for playing Wing Commander."