The Source of Doom... A six part series all about the Doom 3 source code
- Posted: Jul 04, 2012 at 6:00AM
- 11,794 views
For our Wild Wednesday project it's time to get into the wayback machine and not only play a little Doom 3 but play with its source too.
I thought this a great series that walks you through getting the source, compiling it, walking you through its structure and more.
On November 23, 2011 id Software maintained the tradition and released the source code of their previous engine. This time is was the turn of idTech4 which powered Prey, Quake 4 and of course Doom 3. Within hours the GitHub repository was forked more than 400 times and people started to look at the game internal mechanisms/port the engine on other platforms. I also jumped on it and promptly completed the Mac OS X Intel version which John Carmack kindly advertised.
In terms of clarity and comments this is the best code release from id Software after Doom iPhone codebase (which is more recent and hence better commented). I highly recommend everybody to read, build and experiment with it.
Here are my notes regarding what I understood. As usual I have cleaned them up: I hope it will save someone a few hours and I also hope it will motivate some of us to read more code and become better programmers.
Part 1: Overview
Part 2: Dmap
Part 3: Renderer
Part 4: Profiling
Part 5: Scripting
Part 6: Interviews (including Q&A with John Carmack)
As you might expect, it starts with getting the source;
The source code is now distributed via Github which is a good thing since the FTP server from id Software was almost always down or overloaded.
The original release from TTimo compiles well with Visual Studio 2010 Professional. Unfortunately Visual Studio 2010 "Express" lacks MFC and hence cannot be used. This was disappointing upon release but some people have since removed the dependencies.
Moves to the architecture of the game;
The solution is divided in projects that reflect the overall architecture of the engine:
Most of the codebase has been accessible since October 2004 via the Doom3 SDK: Only the Doom3 executable source code was missing. Modders were able to build
gamex86.dllbut the core of the engine was still closed source.
The post and series continues from their provide some great details on the Doom 3 source and structure.
If you're interested in Doom, games like it and the source around them, this series is a must read.