Doom 3 source code to be released

Blast from the past! Tell us about all those old classics that you grew up with.
Post Reply
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Doom 3 source code to be released

Post by Ron2K »

Slashdot wrote:John Carmack just confirmed during his QuakeCon 2011 keynote that the source code to Doom 3 will be released this year. The source drop will follow the release of their Rage game in October. Carmack has also challenged other game developers to release their old source code.
Source
Kia kaha, Kia māia, Kia manawanui.
J_Bay
Registered User
Posts: 70
Joined: 13 Jan 2011, 13:48

Re: Doom 3 source code to be released

Post by J_Bay »

I know this might sounds like a stupid question, but what will people be able to use this for?
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Re: Doom 3 source code to be released

Post by Ron2K »

Well, it's great for:
  • Current game developers - they can learn a few new tricks (case in point: the fast inverse square root algorithm used in Quake III Arena - I remember having fun playing with that code snippet).
  • New game developers - they can learn from the masters and see if they have what it takes.
  • The hacking fraternity - they can port the game to new platforms, mod the source to add new features or take advantage of new technology.
Basically, if you understand code and are curious about how things work, this benefits you. The way that you asked the question though, I doubt that you'll appreciate the value behind any of this.
Kia kaha, Kia māia, Kia manawanui.
J_Bay
Registered User
Posts: 70
Joined: 13 Jan 2011, 13:48

Re: Doom 3 source code to be released

Post by J_Bay »

LOL, ya I'm not a coder, I've just never been able to stick with it. The first thing I thought of was seeing it ported to Linux, or maybe having people mod the game. I asked just for confirmation. I think it's cool of ID to do it, at least people can benefit from it.
Anakha56
Forum Administrator
Posts: 22136
Joined: 14 Jun 2004, 02:00
Processor: Ryzen 1700K
Motherboard: Asus X370
Graphics card: Asus 1060 Strix
Memory: 16GB RAM
Location: Where Google says

Re: Doom 3 source code to be released

Post by Anakha56 »

Ron2K wrote:
  • Current game developers - they can learn a few new tricks (case in point: the fast inverse square root algorithm used in Quake III Arena - I remember having fun playing with that code snippet).
Ron I am glad you understood that code because it means gibberish to me.

Its good to see companies releasing code, I may not understand it but as you said it will benefit the current and new coders. Any bets on who will release their code next?
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Re: Doom 3 source code to be released

Post by Ron2K »

Anakha56 wrote:Ron I am glad you understood that code because it means gibberish to me.
Well, you don't write code for a living, so I guess that that's somewhat understandable. :P That particular algorithm is pure genius though, which is why I singled it out.
Kia kaha, Kia māia, Kia manawanui.
J_Bay
Registered User
Posts: 70
Joined: 13 Jan 2011, 13:48

Re: Doom 3 source code to be released

Post by J_Bay »

I've always wanted to learn just one programming language...just never been able to, lol!
doo_much
Registered User
Posts: 26022
Joined: 13 May 2004, 02:00
Location: Getting there...
Contact:

Re: Doom 3 source code to be released

Post by doo_much »

Anakha56 wrote:
Ron2K wrote:
  • Current game developers - they can learn a few new tricks (case in point: the fast inverse square root algorithm used in Quake III Arena - I remember having fun playing with that code snippet).
Ron I am glad you understood that code because it means gibberish to me.
I at least understood the comments. LMGA! :lol:
MOOD - Thirsty

A surprising amount of modern pseudoscience is coming out of the environmental sector. Perhaps it should not be so surprising given that environmentalism is political rather than scientific.
Timothy Casey
User avatar
StarPhoenix
B.Soc.Sci, M.SocSci [UPCF]
Posts: 17634
Joined: 11 Dec 2003, 02:00
Processor: Core i5 3470
Motherboard: Gigabyte G1 Sniper Z77
Graphics card: nVidia GeForce GTX 1060
Memory: 8Gb DDR3 1600
Location: East London
Contact:

Re: Doom 3 source code to be released

Post by StarPhoenix »

I found the Wiki link interesting. I [vaguely] remember using Newton's Method in MAT101 during my short stay at Rhodes University.

Ron, how is it that "i" can be assigned two apparently different values? [as is "y"]?

"Long" and "Float" refer to types of numbers and have something to do with precision?
"Humankind cannot bear very much reality." T.S. Elliot
Bladerunner
Registered User
Posts: 14338
Joined: 04 Sep 2004, 02:00
Processor: i386DX Sooper
Motherboard: A blue one
Graphics card: A red one
Memory: Hard drive
Location: On a Möbius strip
Contact:

Re: Doom 3 source code to be released

Post by Bladerunner »

Ron2K wrote:
Anakha56 wrote:Ron I am glad you understood that code because it means gibberish to me.
Well, you don't write code for a living, so I guess that that's somewhat understandable. :P That particular algorithm is pure genius though, which is why I singled it out.
Genius and some luck since:
So the analysis was correct in predicting that the new constant
[after attempting to find a theoretically better constant]
would approximate better in practice. Yet surprisingly, after one Newton
iteration, it has a higher maximal relative error. Which again raises
the question: how was the original code constant derived?

...

Starting at the initial constant, and testing all constants above and
below until the maximal relative error exceeds 0.00176 gives the third
constant 0x5f375a86 as the best one; each was tested over all floating
point values. The table shows it has a smaller maximal relative error
than the original one.

...

The new constant 0x5f375a86 appears to perform slightly better than the original one.
Since both are approximations, either works well in practice. I
would like to find the original author if possible, and see if the method
was derived or just guessed and tested.
http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf
Lomont pointed out that the "magic number" for 64 bit IEEE754 size type double is 0x5fe6ec85e7de30da, but in fact it is close to 0x5fe6eb50c7aa19f9. Charles McEniry performed a similar but more sophisticated optimization over likely values for R. His initial brute force search resulted in the same constant that Lomont determined. When he attempted to find the constant through weighted bisection, the specific value of R used in the function occurred, leading McEniry to believe that the constant may have originally been derived through "bisecting to a given tolerance".
If I weren't insane: I couldn't be so brilliant! - The Joker
Post Reply