Quake 2 Source Code Review
fabiensanglard.net
fabiensanglard.net
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.
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?Search for _controlfp.. seems some MS API calls could change it.
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.
This is so bookmarked!
I finally just jumped into 2D games recently and found it surprisingly easy. Once I'm comfortable with 2D, I'm moving on to 3D as well.
I'd suggest you just jump in as well. Don't worry about taking a week off or whatever. Just use some of your free time at night and get started.
You can also see the framework Three.Js[1], which Mr. Doob used/created on his Google Colabs[2]
I have work to do!
Edit: changed direct link to YC link.
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;