The demons came and the marines died. Except one. Your are the last defence against these hell-spawned hordes. Prepare for the most intense mutant-laden, blood-splattered action ever! The texture-mapped virtual world is so real, you don't just play DOOM - you live it.

Report article RSS Feed Getting Started: Source Code Modding for Doom, Part 3

In this tutorial we will show in simple steps how to build the source code for Chocolate Doom ,Eternity Engine and Prboom+ ,on VC++ 2008 Express Edition.

Posted by Delyon on Nov 16th, 2011
Basic Client Side Coding.

Getting Started: Source Code Modding for Doom, Part 3.
Game: Doom, Doom2.
Level: Basic.
Objective: By the end of this article the reader should be able to compile the source codes for 3 popular Doom ports using VC++ 2008 Express Edition .
Resources required: VC++ 2008 Express Edition.
Introduction:
in this article I will describe in simple steps how I built the following Doom ports using VC ++ 2008 Express Edition:
1. Chocolate Doom.
2. Eternity.
3. Prboom plus.
It is also possible to use this procedure to build some other game ports that were developed using VC++ 2008 and the SDL libraries such as Wolf3d for windows (wolf4sdl & new wolf nwsrc73 ) .
Pre-requisites:
I suggest that you first read through "Getting started tutorials Parts 1 and 2" of this series .This should give you enough information, if you don't already know, on how to set up VC++ 2008 Express Edition and use it to compile a mod for doom. May I also suggest that you pay a visit to the Chocolate Doom home page as it contains a lot of valuable information for this popular port.
Procedure:
Step 1:
Getting the right resources:
First you need to head over to Libsdl.org and download the following collection of important audio, networking and other SDL development resources:
1. Download SDL Development Libraries for win32, click
here.
2. Download SDL_Mixer library from
here .
3. Download SDL_Net library click
here
4. You need also to download the SDL_Image library but only if you want to compile prboom plus. Get it from here
Step 2:
Preparations:
Extract all the above into one common directory on your hard drive, let's call it SDL_resources; for example:
C:\SDL_resources\ SDL
C:\SDL_resources\ SDL_mixer
C:\SDL_resources\ SDL_net
C:\SDL_resources\ SDL_image

Step 3:
Setting up the search folders:
Next you need to set the paths for the include and library folder locations for these resources in VC++ Express. This is very easy; here is one example for setting the path for the SDL libraries. All the other 3 are done the same way:
1. From the menu bar, select "Tools" then "Options" as in figure 1 below:


Figure1

2. From the dialog box that opens, click on "VC++ Directories" on the left pane as shown in figure 2 below, if it is not already open for you by default; then click on the drop-down list under the heading "Show directories for", from this list select the option "Include files" as shown in figure 2:


Figure 2

4. Click on the new folder icon as shown in figure 3, a directory navigation button will appear, click it:


Figure 3

5. Using the "Select Directory" dialog box that opens as in figure 4, navigate your way to the "include" subfolder inside your SDL main directory, which is in this case : "C:\SDL_resources\SDL\":


Figure 4

6. Click OK to close this dialog box. The full path should appear in the options box as shown in figure 5 below:


Figure 5

7. Now click on the check button to finish this step. Do not close this box yet.
8. Next you need to do the same for the library folder. Click on the drop-down list box again as shown in figure 6 below and select "Library files" from this list ,navigate your way in the same fashion to the library subfolder in the SDL directory as shown in fig 7. Click to select the" lib" subfolder and press "OK"to close.


Figures 6


Figure 7
9. Now the path for the SDL lib search folder is set and should look like figure 8 below:


Figure 8

10. Go ahead and repeat the same procedure with the other 3 SDL resources. You should end up with something like figures 9 and 10:


Figure 9


Figure 10

Step 4:
Get your source code:
In this step we download the source code for each individual source port. Choose your favorite one and click to download (all links are valid at the time of writing):
1. Get your Chocolate Doom source code from
here.
2. To download Eternity port source code click
here.
3. The source code for Prboom + , grab it by clicking
here.
You can always use Tortoise SVN to get the latest releases if available.
Now extract each zip file or tar ball into an appropriately named file of your choice, for example:

C:\GameSource\chocolate_doom\
C:\GameSource\eternity\
C:\GameSource\prboom_plus\

Step 5:
Build your port:
You are now ready to compile. This should be a straightforward process; just navigate to and open the respective solution file in your VC++ 2008 Express Edition and select which configuration you want to compile and then simply click on "Build"on the menu bar and choose "Build Solution", no further setting up is required. Find Chocolate Doom solution file inside the "msvc"subfolder and select to build "Release Client" or any of the others, according to your choice. For Eternity choose the one inside the "vc2008" subfolder if you are using the latest version.
If you are not sure, you can always follow the procedure shown in "Getting Started: Source Modding for Doom, Part 2 "on how to open the Solution file and choose a configuration. Your executable should compile and link error-less. Find it in either the "Release" or "Debug" subfolders depending on which configuration you selected to build. Eternity.exe usually builds perfectly on VC++ Express Edition, without even a single warning. Chocolate Doom may cough up a few but they should be totally harmless!
However when you open the solution file for Prboom plus, you may get a message telling you that "Solution folders are not supported....etc", just ignore and click "OK" to close and go on to build your Doom (this port was probably developed using the commercial version and not the Express Edition). When it comes to configurations, Prboom+ offers more options. I suggest you choose the ReleaseOpenGL version for better graphics, but it is entirely your call.
Now you should have no excuses; you could do all your Doom modding using your favorite port.
All my greetings go to the ports authors and developers for their hard work.
Enjoy.
Adam.

Return to the Tutorials Page.

Post comment Comments
ShadowsRage
ShadowsRage Jan 13 2014, 3:30pm says:

Finally! Wow thanks a ton for these! I have been trying to build chocolate doom all night and nothing worked except this (can't seem to build the newer versions though... might need to move some files to make it work. But I just want to study the code so any version is good for me). You might want to add that once you have built the solution you need to put the .dll files (SDL.dll, SDL_net.dll, etc.) in the newly created debug or release folder in the msvc subfolder for chocolate doom. Will go through your tutorials now cause they seem really great. Thanks again for all this nice work!

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Doom
Platforms
Windows, Mac, Linux, DOS, SNES, GBA, PS1, X360, XBOX
Developer & Publisher
id Software
Engine
Doom Engine
Contact
Send Message
Official Page
Idsoftware.com
Release Date
Released Dec 9, 1993
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Doom
Doom Single & Multiplayer First Person Shooter
Related Engines
Doom Engine
Doom Engine GPL Released Dec 10, 1993
Related Groups
id Software
id Software Developer & Publisher