Jump to content

  • Log In with Google      Sign In   
  • Create Account


Study Doom 3 code


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 dimitris89gr   Members   -  Reputation: 105

Like
0Likes
Like

Posted 16 January 2013 - 12:53 PM

Hello,

I want to study the Doom 3 code and I would like some help. How can I start reading it? Should i find a main() function and go on from there?

Any other tips that may help me?

Thank you for your time


Sponsor:

#2 Ravyne   Crossbones+   -  Reputation: 5665

Like
6Likes
Like

Posted 16 January 2013 - 01:26 PM

Pick a subsystem you're interested in and dive in. You may want to try to get a broad-strokes overview of the high-level setup, which is presumably why you would start with main, but since other folks have already done the work of that and written about it, I'd say the best approach is to just read their analysis for that info, and dig into specific sub-systems for details that you're interested in.

 

I'd also caution against putting the Doom 3 code on any sort of pedestal. Its a great resource to have the source of a commercial game as renowned as Doom 3, but there's a lot of other great open-source code too. There was a recent opinion article on the "beauty" of the Doom 3 source code, but exercise caution and judgment, as it was just that--an opinion of one person, who, in the very same article, says that he considers himself "not a coder", although he has published a game himself. Having read that article myself yesterday, much of what he considers "beautiful" are things that myself and others would consider ugly. If you're looking to the code as a model for you to mimic, you could do worse, but you could also do better. Don't assume the code or design is great just because it's Doom, or just because its Carmack. 



#3 web383   Members   -  Reputation: 696

Like
5Likes
Like

Posted 16 January 2013 - 01:30 PM

This may be of interest to you - http://fabiensanglard.net/doom3/index.php

#4 Karsten_   Members   -  Reputation: 1200

Like
0Likes
Like

Posted 16 January 2013 - 05:12 PM

Are you sure you want to study the Doom 3 src code?

I would suggest only studying it if you are very familiar with C/C++. Likewise I would only suggest studying a large Unity codebase if you are familiar with Unity.

The fact that you need to ask this question kinda seems that you have been recommended Doom 3 by someone a little unfamiliar with how software (especially games development) is best learnt.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#5 Lil_Lloyd   Members   -  Reputation: 287

Like
0Likes
Like

Posted 16 January 2013 - 08:45 PM

There was a recent opinion article on the "beauty" of the Doom 3 source code, but exercise caution and judgment, as it was just that--an opinion of one person, who, in the very same article, says that he considers himself "not a coder", although he has published a game himself.

 

I think he's just being humble, as in that same opinion piece he showed quite a bit of knowledge of C++, the STL and code readability in general.

 

Anyway in answer to the original post, Doom3 is a MASSIVE codebase, by a team of programmers conforming to a set of standards in terms of code layout and practices. If you  have little experience in 3d game programming maybe looking at the original Doom source code would be good, despite in being in C and hard to understand at times refactoring the code into an object oriented style of your choice (either using inheritance or a flat component based hierarchy) would be a good learning exercise albeit a long one. 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS