News for hackers. Stuff that matters.
Re:Quake 2 Source Code Review by xedarius on Wednesday September 21, 2011 @05:04AM (#3021286)
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.

Re:Quake 2 Source Code Review by wccrawford on Tuesday September 20, 2011 @02:14PM (#3018845)
"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.

Re:Quake 2 Source Code Review by 0x0 on Tuesday September 20, 2011 @05:07PM (#3019575)
I 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?
Re:Quake 2 Source Code Review by apaprocki on Tuesday September 20, 2011 @06:14PM (#3019835)
http://gafferongames.com/networking-for-game-programmers/flo...

Search for _controlfp.. seems some MS API calls could change it.

Re:Quake 2 Source Code Review by daemin on Tuesday September 20, 2011 @08:47PM (#3020264)
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.

Re:Quake 2 Source Code Review by AshleysBrain on Tuesday September 20, 2011 @05:49PM (#3019754)
Maybe it's because the calls to functions in DLLs could, in theory, change it?
Re:Quake 2 Source Code Review by cdavid on Wednesday September 21, 2011 @08:21AM (#3021672)
You 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).
Re:Quake 2 Source Code Review by kleiba on Tuesday September 20, 2011 @09:58PM (#3020402)
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.

This is so bookmarked!

Re:Quake 2 Source Code Review by DanielRibeiro on Wednesday September 21, 2011 @11:27AM (#3022353)
WebGL makes it really easy for anyone to start now: 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

[2] http://www.ro.me/tech/

Re:Quake 2 Source Code Review by wccrawford on Wednesday September 21, 2011 @07:23AM (#3021529)
I 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.

Re:Quake 2 Source Code Review by kleiba on Wednesday September 21, 2011 @08:29PM (#3024271)
Free time at night? What are you talking about? ;-)
Re:Quake 2 Source Code Review by quux on Tuesday September 20, 2011 @02:39PM (#3018989)
Dammit... first the workings of Thief and now this!

I have work to do!

Re:Quake 2 Source Code Review by eru on Tuesday September 20, 2011 @10:37PM (#3020500)
I've missed the submission about Thief. Do you have a link?
Re:Quake 2 Source Code Review by sil3ntmac on Wednesday September 21, 2011 @01:40AM (#3020937)
http://news.ycombinator.com/item?id=3017013

Edit: changed direct link to YC link.

Re:Quake 2 Source Code Review by 6ren on Wednesday September 21, 2011 @01:42AM (#3020939)
HN search (see the very bottom of most pages) works surprisingly well: http://www.hnsearch.com/search#request/all&q=Thief
Re:Quake 2 Source Code Review by VMG on Tuesday September 20, 2011 @02:34PM (#3018966)
Excellent. I had a lot of fun recently looking at ioquake3 code and picking up a thing or two.
Re:Quake 2 Source Code Review by Agathos on Tuesday September 20, 2011 @03:13PM (#3019138)
On a totally different note, my wrists hurt just looking at that picture of Carmack in front of his Intergraph monitor. Lower your keyboard, man!
Re:Quake 2 Source Code Review by secoif on Wednesday September 21, 2011 @05:48AM (#3021351)
D: At first, I thought you were telling us you were getting a bit too excited about John Carmack and his monitor.
Re:Quake 2 Source Code Review by msftguy on Tuesday September 20, 2011 @06:57PM (#3019960)
"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;