Getting Started: Source Code Modding for Doom, Part 3.
Game: Doom, Doom2.
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.
in this article I will describe in simple steps how I built the following Doom ports using VC ++ 2008 Express Edition:
1. Chocolate Doom.
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 ) .
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.
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
Extract all the above into one common directory on your hard drive, let's call it SDL_resources; for example:
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:
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:
4. Click on the new folder icon as shown in figure 3, a directory navigation button will appear, click it:
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\":
6. Click OK to close this dialog box. The full path should appear in the options box as shown in figure 5 below:
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.
9. Now the path for the SDL lib search folder is set and should look like figure 8 below:
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:
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:
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.
Return to the Tutorials Page.