Sign in with
Sign up | Sign in

id Software Finally Releases Edited Doom 3 Source Code

By - Source: Slashdot | B 23 comments

As promised, id Software has released the source code to Doom 3 although it's been slightly altered to avoid a possible patent dispute with Creative Labs.

On Tuesday id Software quietly released the source code behind the studio's 2004 shooter, DOOM 3. Naturally the code doesn't contain any game data, as the DOOM 3 material is still covered by the original EULA. However the source has been altered slightly to avoid possible patent disputes related to Creative Labs' 3D shading technique called "depth fail."

"Lawyers are still skittish about the patent issue around 'Carmack's reverse,' so I am going to write some new code for the doom3 release," John Carmack said via Twitter. "This demonstrates the idiocy of the patent -- the workaround added four lines of code and changed two."

During DOOM 3's development, Carmack independently discovered and publicized a shading process later dubbed as "Carmack's Reverse," but Creative Labs had already filed for a patent on the technique back in 1999. Carmack said he created a separate shading method that got around the patent issues, but that meant a significant "speed hit" in DOOM 3's performance. Thus, the studio had no choice but to license the "depth fail" patent from Creative and move on.

"The Doom 3 GPL source code release does not include functionality enabling rendering of stencil shadows via the 'depth fail' method, a functionality commonly known as 'Carmack's Reverse,'" states the source code notes.

To get the DOOM 3 source code, head here via Github.

Display 23 Comments.
This thread is closed for comments
Top Comments
  • 21 Hide
    gaborbarla , November 23, 2011 5:36 AM
    So creative patented the "Carmack's Reverse" back in '99? Reminds me of the time in the 90s when some company patented cursor flashing using XOr, so all programmers had to write dubiously long code to flash cursors.

    I feel there is something fundamentally wrong with this whole process of patenting.
Other Comments
  • 0 Hide
    kcorp2003 , November 23, 2011 5:12 AM
    yeah i was busy looking at this yesterday. i feel old now.
  • 21 Hide
    gaborbarla , November 23, 2011 5:36 AM
    So creative patented the "Carmack's Reverse" back in '99? Reminds me of the time in the 90s when some company patented cursor flashing using XOr, so all programmers had to write dubiously long code to flash cursors.

    I feel there is something fundamentally wrong with this whole process of patenting.
  • 4 Hide
    TheDane , November 23, 2011 5:45 AM
    'Carmarck's reverse' might be reintroduced - at least someone seems to know what the code would resemble :-)

    http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm
  • -6 Hide
    alidan , November 23, 2011 6:13 AM
    shadows is basically the only thing that my pc cant really handle all that well, i turn them down to nothing for that reason, i wish that instead of soft shadows they would revert to hard ones, hard shadows would look better than soft at the lowest end.
  • -8 Hide
    giovanni86 , November 23, 2011 6:59 AM
    Seriously, 7 years later. Who would really even want use this for any game of today. Believe me when i say this i loved the game, and honestly i never passed it because I get to scared when i would i play it. I'm just one of those poor souls that get frightened very easily. On that note though, i doubt any amazing mods or games will come from this Old technology. Release the rage code since it sucked so bad. And while your at it start making a new Quake game that resembles quake 3 arena please! I love that game. I want my fast paced shooters back in action like UT and Quake =D Re-made and redone in full action for the PC only!
  • 1 Hide
    JonnyDough , November 23, 2011 8:34 AM
    I for one, would love to be there to welcome Creative Labs into the ground where they belong. I am sick of their bloated drivers (similar to HPs) and how they make proprietary technologies (like EAX). Reading about this doesn't surprise me at all.
  • 6 Hide
    back_by_demand , November 23, 2011 8:49 AM
    7 years and it is STILL one of the best games I have played, even today the teleport to hell through the tunnel of blood sends a creepy chill down my spine. Best played on a dark stormy night with the lights off on a big screen, preferably Halloween.
    WOOOOOOOOOOOOOOO!!!!!!!!!!!!!
  • 0 Hide
    climber , November 23, 2011 9:32 AM
    Creative Labs patent, I would assume that it's really a 3D Labs patent. Remember that Creative Labs bought 3D Labs and all its IP, so I would presume that Creative Labs has the patent dating back to 1999 because of this.
  • -1 Hide
    nottheking , November 23, 2011 10:14 AM
    It's about time we've seen the Doom 3 engine (aka idTech 4) finally GPL'd. For those unaware, Carmack, Id, et. al, have liked to release the source code for their engines. Granted, in the past 10 or so years, Carmack's dogmatic clinging to OpenGL instead of DirectX has largely marginalized his engines to not be as important as they used to be, but even today, it's good to have a major engine available as open-source.

    I will admit it's been disturbing that starting with Quake, each engine has taken longer from the release of the initial game to it being GPL'd as open-source: 3 years for Quake, (1996->1999) 4 for Quake II/Id Tech 2, (1997-2001) 6 for Quake III/Id Tech 3 (1999-2005) and now 7 years for Doom 3/Id Tech 4. (2004->2011)
  • 0 Hide
    theconsolegamer , November 23, 2011 10:26 AM
    Call Of Duty: More Of The Same Warfare still uses this shit.
  • 3 Hide
    jimmy-bee , November 23, 2011 12:33 PM
    Please do a remake of Vampire Bloodlines with this engine, that game was a cult classic and used the old Halflife engine.
  • 2 Hide
    zanny , November 23, 2011 1:29 PM
    notthekingIt's about time we've seen the Doom 3 engine (aka idTech 4) finally GPL'd. For those unaware, Carmack, Id, et. al, have liked to release the source code for their engines. Granted, in the past 10 or so years, Carmack's dogmatic clinging to OpenGL instead of DirectX has largely marginalized his engines to not be as important as they used to be, but even today, it's good to have a major engine available as open-source.I will admit it's been disturbing that starting with Quake, each engine has taken longer from the release of the initial game to it being GPL'd as open-source: 3 years for Quake, (1996->1999) 4 for Quake II/Id Tech 2, (1997-2001) 6 for Quake III/Id Tech 3 (1999-2005) and now 7 years for Doom 3/Id Tech 4. (2004->2011)


    Its not dogmatic. It is on principle, and one that I embrace. OpenGL is an open standard for graphics technology, that is cross platform and can be implemented on any video device. DirectX is a Windows wrapper layer for video that is proprietary to Microsoft and thus can't be cross platform, ever.

    You would think that OpenGL meant the burden of implementation fell on drivers, but it does even with DirectX, every new game (like Skyrim) Nvidia / AMD are in a race to release hacked drivers that optimize whatever DirectX calls new games use, without actually knowing the implementation of DirectX in the OS. Either way you go, the drivers change on a daily basis.

    DirectX is just M$ getting in the way of graphics technology. OpenGL applies to everything from cell phones to rendering farms for animation to web based applications. DirectX is only ever used in gaming, and only because M$ has a ridiculous grasp on the PC gaming market, BECAUSE of their psuedo-monopoly where everyone uses DirectX, and thus Nvidia / AMD have poor OpenGL compliant drivers, etc.

    OpenCL though, will probably revolutionize this entire shebang. I expect Carmack to write id 6 almost exclusively with OpenCL to crank out whatever ounce of performance per frame he can come up with. Where OpenGL is an abstraction library of binary function calls that are generalized across platform and provided by the driver, openCL is a language wrapper that lets programs execute direct GPU commands like on the 360 and ps3, which is what he was talking about at the Quakecon keynote.
  • -2 Hide
    beardguy , November 23, 2011 2:56 PM
    Maybe I'm ignorant, but what is the purpose of this? Is anyone going to use this ancient engine for anything?

    Even the last game released on this engine in 2009 ( Riddick: Assault on Dark Athena) was totally dated graphically even 2 years ago.
  • 1 Hide
    capttoilet , November 23, 2011 3:29 PM
    beardguyMaybe I'm ignorant, but what is the purpose of this? Is anyone going to use this ancient engine for anything? Even the last game released on this engine in 2009 ( Riddick: Assault on Dark Athena) was totally dated graphically even 2 years ago.


    Brink uses IDtech 4 and the upcoming Prey 2 uses it as well, so I wouldn't count it as dead yet. Hell UE2.5 is still being used and it is just as old.
  • 2 Hide
    memadmax , November 23, 2011 4:34 PM
    OpenGL really needs to be refreshed and brightened up to put MS back on the defensive on DirectX. I'm tired of MS dictating what graphics manufactures can and cannot do with their vid cards...
  • 0 Hide
    beardguy , November 23, 2011 6:07 PM
    capttoiletBrink uses IDtech 4 and the upcoming Prey 2 uses it as well, so I wouldn't count it as dead yet. Hell UE2.5 is still being used and it is just as old.


    Wow, guess I am ignorant. That's pretty crazy, but I guess it's been updated A LOT since it's release.
  • 0 Hide
    Anonymous , November 23, 2011 6:13 PM
    I think they should do a major refactoring on the OpenGL-API. It's just way nicer to program DirectX as it is to do OpenGL.

    Though, I'd like to see a DirectX-like API to go cross platform. That would be awesome.
  • 2 Hide
    iam2thecrowe , November 23, 2011 6:54 PM
    gaborbarlaI feel there is something fundamentally wrong with this whole process of patenting.

    Apple has shown us this more than any other company. We all KNOW there is something wrong with the patent system, the problem is no one is doing anything about it.
  • 1 Hide
    Anonymous , November 23, 2011 7:13 PM
    beardguy :
    Maybe I'm ignorant, but what is the purpose of this? Is anyone going to use this ancient engine for anything? Even the last game released on this engine in 2009 ( Riddick: Assault on Dark Athena) was totally dated graphically even 2 years ago.

    Your statement is wrong on every level. Not only are there new games coming out using the engine, Dark Athena didn't use it at all.
  • 0 Hide
    beardguy , November 23, 2011 7:30 PM
    avisgothbeardguy :Maybe I'm ignorant, but what is the purpose of this? Is anyone going to use this ancient engine for anything? Even the last game released on this engine in 2009 ( Riddick: Assault on Dark Athena) was totally dated graphically even 2 years ago.Your statement is wrong on every level. Not only are there new games coming out using the engine, Dark Athena didn't use it at all.


    I just discovered both of these Riddick titles used the Starbreeze Engine, my bad.
Display more comments