Dirty coding tricks: ugly hacks that are absolutely necessary to get a game done.
Culled from the pages of Game Developer magazine, these valiant stories of messed up programming techniques have proven to be some of Gamasutra's most popular articles; they shed a light on the secrets we don't like to talk about -- but when we do, they're fascinating.
Back on the first Wing Commander 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."
Here's how Game Developer's former editor in chief Brandon Sheffield originally described them:
Programmers are often methodical and precise beasts who do their utmost to keep their code clean and pretty. But when the chips are down, the perfectly-planned schedule is shot, and the game needs to ship, "getting it done" can win out over elegance.
In a case like this, a frazzled and overworked programmer is far more likely to ignore best practices, and hack in a less desirable solution to get the game out the door.
We want your stories -- so we can bring you a third installment of the franchise.
Have a good one? Please send it to [email protected] with the subject "Dirty Coding Tricks." Submissions can be anonymous if you wish. We'll print the best in a new Gamasutra article.