I really respect Carmack, he is one of the few programmers I'd describe as an industry trend setter. I've worked on many games in my career, and seen a lot of engines. When you read through the Q2 and perhaps a better example is the Q3 engine source, you sit there and think, hang on .. where's the rest of the code? He takes a complex problem and reduces it to a set of simple components, and reuses those components. This is incredibly hard to do.
What the article doesn't impress upon people is the effect Carmacks code has on the industry. The shaders in Quake 3 were a huge thing, now seems so obvious. I have no evidence for this, however I wouldn't be surprised if Q3 shaders are the reason we have vertex/pixel shaders in hardware today.
"I have no idea why id software decided to trust the C Standard Library at this point"
This quote reminds me why I liked watching Notch's video for Ludum Dare. We not only get to see the final result, but the way it got to be that way, and some of his thoughts on it as well.
// Set the floating point precision ...
_controlfp
// Question: Why do that for every frames ? Probably because precision is altered during the loop execution.
// Answer: The is no other call to this function. It appears that floating point precision remains the same during program execution.
I seem to vaguely recall reading something about some versions of Windows not preserving the FPU state across task switches. Could it be that this call to configure the FPU for every frame is a workaround for that?
I've also experienced Windows / DirectX API's use MMX, hence the floating point code I was using (x87 FPU) required a femms instruction before it to change back from MMX state.
This just goes to show that if you need a particular state on a processor (CPU, FPU, GFX, etc) you need to set it explicitly before use.
3D graphics is something I've always wanted to look into more once I have a lot of time on my hands. Watching a good deal of Notch's ludum dare already whetted my appetite.
And now just glancing over this article makes my finger tips itch, I'd like to take a week off and start diving into it. It's just great. I love the extra work Fabien put in to link to many external books and articles.
"Since I was running Windows on a Mac with Parallels it was uneasy to hit "printscreen" while the game was running. I hardcoded the '*' from the keypad to produce the same"
Umm.. educational, sure, but can't you just:
alias +shift "bind 8 screenshot";
alias -shift "bind 8 whatever_was_bound_to_8";
bind shift +shift;
What the article doesn't impress upon people is the effect Carmacks code has on the industry. The shaders in Quake 3 were a huge thing, now seems so obvious. I have no evidence for this, however I wouldn't be surprised if Q3 shaders are the reason we have vertex/pixel shaders in hardware today.