6 ms·
Quake 2 Source Code Review
- wccrawford 15y ago"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.
- VMG 15y agoExcellent. I had a lot of fun recently looking at ioquake3 code and picking up a thing or two.
- quux 15y agoDammit... first the workings of Thief and now this! I have work to do!
- eru 15y agoI've missed the submission about Thief. Do you have a link?
- sil3ntmac 15y agohttp://news.ycombinator.com/item?id=3017013 http://news.ycombinator.com/item?id=3017013 Edit: changed direct link to YC link.
- 6ren 15y agoHN search (see the very bottom of most pages) works surprisingly well: http://www.hnsearch.com/search#request/all&q=Thief http://www.hnsearch.com/search#request/all&q=Thief
- deleted 15y ago[deleted]
- Agathos 15y agoOn a totally different note, my wrists hurt just looking at that picture of Carmack in front of his Intergraph monitor. Lower your keyboard, man!
- secoif 15y agoD: At first, I thought you were telling us you were getting a bit too excited about John Carmack and his monitor.
- 0x0 15y agoI noticed this comment in the "notes.html": // 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?
- AshleysBrain 15y agoMaybe it's because the calls to functions in DLLs could, in theory, change it?
- apaprocki 15y agohttp://gafferongames.com/networking-for-game-programmers/floating-point-determinism/ http://gafferongames.com/networking-for-game-programmers/flo... Search for _controlfp.. seems some MS API calls could change it.
- daemin 15y agoI'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.
- cdavid 15y agoYou may mix up with linux (which does not save the FPU state: that's why you can't use most floating point operations in the kernel).
- msftguy 15y ago"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;
- kleiba 15y ago3D 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. This is so bookmarked!
- wccrawford 15y agoI said something very similar to that for many years. 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.
- kleiba 15y agoFree time at night? What are you talking about? ;-)
- DanielRibeiro 15y agoWebGL makes it really easy for anyone to start now: http://learningwebgl.com/blog/?page_id=1217 http://learningwebgl.com/blog/?page_id=1217? You can also see the framework Three.Js[1], which Mr. Doob used/created on his Google Colabs[2] [1] https://github.com/mrdoob/three.js https://github.com/mrdoob/three.js [2] http://www.ro.me/tech/ http://www.ro.me/tech/
- deleted 15y ago[deleted]
- xedarius 15y agoI 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.