Skip to main content

id Software Finally Releases Edited Doom 3 Source Code

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.

  • kcorp2003
    yeah i was busy looking at this yesterday. i feel old now.
    Reply
  • gaborbarla
    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.
    Reply
  • TheDane
    '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
    Reply
  • alidan
    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.
    Reply
  • giovanni86
    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!
    Reply
  • JonnyDough
    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.
    Reply
  • back_by_demand
    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!!!!!!!!!!!!!
    Reply
  • climber
    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.
    Reply
  • nottheking
    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)
    Reply
  • theconsolegamer
    Call Of Duty: More Of The Same Warfare still uses this shit.
    Reply