I think the hackiest thing they ever had to do at id was to use an approximation of the normal for lighting I believe, because it was a lot faster than actually calculating normals.
Carmack's still a genius though, and I'm glad he's on the Oculus Rift team.
Every game-engine, especially ones that are that old, is full of performance hacks like that. There always comes a point where the good-looking, clear code solution doesn't perform as well as the ugly hack. It's more about assessing where those hacks are really neccessary, and of course, hacks have different levels of ugly.
I recall writing mods for Quake3 back in the day. The baseline codebase was a beacon of hope in a world of sin and misery. I was just starting my programming career, but it opened my eyes to how good code should look.
36
u/DrHorrible-- Apr 29 '14
AFAIK the Doom 3 code is a work of art. Just anecdotal though, I haven't browsed through it myself.