DOOM 3's (aka id tech 4) source code has been released!

Too bad John had to rip out some of the cool, innovative bits for the sake of a few lousy patents.

Anyway, it will be interesting to watch and see what kinds of things people manage to do with this.

Share this post


Link to post

But didn't he mention something about "writing some new code" recently in his Twitter? Exactly about that "Carmack's Reverse" stuff...
..or maybe he will make some changes in a near future? Who knows.

And yes, that's a little sad thing (not including of "rendering of stencil shadows"). Still...

Share this post


Link to post

My guess is that the patented technique has been replaced with something that does the same job but isn't patented.
Will be interesting to see how the source is used by modders.

Share this post


Link to post

Time to download and start messing around with stuff.

EDIT: Well, never mind. You need VS2010 to open up the SLN and the Express version doesn't let you use solution folders (what).

Share this post


Link to post
jonwil said:

My guess is that the patented technique has been replaced with something that does the same job but isn't patented.
Will be interesting to see how the source is used by modders.

It's the same system, but with about four lines changed so as to get around the patent.

@id_aa_carmack twittered:
where it can't be shown the player is outside a shadow volume, I used the "preload" technique from http://kb.cnblogs.com/a/28036/

the preload shadow technique may have some other utility -- you can use it with a rear clip plane projection, unlike depth-fail

Share this post


Link to post

Okay so I downloaded the VS2010 trial and tried building it. These are the errors I'm getting:

7>EXEC : warning : idFileSystemLocal::StartBackgroundDownloadThread: failed
7>EXEC : FATAL error : Couldn't load default.cfg
7>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: The command "cd C:\doom\trunk\neo\\..
7>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: "build\Win32\Dedicated Release\TypeInfo.exe"
7>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: :VCEnd" exited with code -1.

5>win_input.obj : error LNK2001: unresolved external symbol _GUID_ZAxis
5>win_input.obj : error LNK2001: unresolved external symbol _GUID_YAxis
5>win_input.obj : error LNK2001: unresolved external symbol _GUID_XAxis
5>win_input.obj : error LNK2001: unresolved external symbol _c_dfDIKeyboard
5>win_input.obj : error LNK2001: unresolved external symbol _GUID_SysKeyboard
5>win_input.obj : error LNK2019: unresolved external symbol _DirectInput8Create@20 referenced in function "void __cdecl IN_InitDirectInput(void)" (?IN_InitDirectInput@@YAXXZ)
5>win_input.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
5>win_input.obj : error LNK2001: unresolved external symbol _c_dfDIMouse2
5>win_input.obj : error LNK2001: unresolved external symbol _GUID_SysMouse
5>win_snd.obj : error LNK2019: unresolved external symbol _DirectSoundCreate@12 referenced in function "public: virtual bool __thiscall idAudioHardwareWIN32::Initialize(void)" (?Initialize@idAudioHardwareWIN32@@UAE_NXZ)
5>..\build\Win32\Dedicated Release\DOOM3.exe : fatal error LNK1120: 10 unresolved externals


I'm going to start looking around on Doom3world to see if I can find anything who fixed the linker and the MSB3073 error. And if anyone's interested here is Carmack's patent work-around:

// patent-free work around
if ( !external ) {
// "preload" the stencil buffer with the number of volumes
// that get clipped by the near or far clip plane
qglStencilOp( GL_KEEP, tr.stencilDecr, tr.stencilDecr );
GL_Cull( CT_FRONT_SIDED );
RB_DrawShadowElementsWithCounters( tri, numIndexes );
qglStencilOp( GL_KEEP, tr.stencilIncr, tr.stencilIncr );
GL_Cull( CT_BACK_SIDED );
RB_DrawShadowElementsWithCounters( tri, numIndexes );
}

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now