Gamasutra - Features - Dirty Coding Tricks

10-Tative Code

Back at [company X], I think it was near the end of [the project], we had an object in one of the levels that needed to be hidden. We didn't want to re-export the level and we did not use checksum names. So right smack in the middle of the engine code we had something like the following. The game shipped with this in.

if( level == 10 && object == 56 )
{
HideObject();
}


Maybe a year later, an artist using our engine came to us very frustrated about why an object in their level was not showing up after exporting to what resolved to level 10. I wonder why?

This is a great article, must read for all developers and would-be developers. I've especially highlighted this section, because I've done something similar of this sort, and its not something which I'm proud of, but had to be done.

317 views and 0 responses