Post tutorial RSS Getting Started: Source Modding for Doom, Part 2

In this session we will show in details how to compile and build jDoom.dll the easy way.

Posted by on - Basic Client Side Coding

Getting Started: Source Code Modding for Doom, Part 2.
Doom, Doom2.
Level: Basic.
Objective: Describe an easy way to compile the source code for jDoom using VC++ express edition .
Resources required: VC++ 2008 Express Edition;Doomsday source code ver 1.9.0-beta6.9;doomsday.lib
If you are looking for a short cut to compile the Doom source code, here it is as I promised in part 1. I will now show you an easy way to do that, but it only works for the Doomsday engine, as you will soon see why. You will only need to download the game source code and one very small file (about 14 KB). This should save you headaches, time and disk space since you no longer have to download and install hundreds of megabyte of files and stuff you wouldn't really need. The following is a very detailed step-by-step procedure meant mainly for the absolute beginner. If you are experienced with Visual Studio, I suggest you skip this section entirely.
1. I am assuming that you have already downloaded and installed Visual C++ 2008 Express Edition from the Microsoft website and ready to go. Now you need to download the latest Doomsday Engine source code from our friends at . The tarball file we need to download is "deng-1.9.0-beta6.9.tar.gz". You can do that from here; if this link does not work for some reason, then you'll have to google for it yourself.
The link will ensure you get the latest and correct version that works for windows and not Linux. The latest version at the time of writing was 1.9.0-beta6.9 .

2. Extract the source tarball file with winrar or whatever, to a suitable location on your drive and remember the path; mine looks like this:

"C:\deng-1.9.0-beta6.9-source\ deng-1.9.0-beta6.9"

3. While you are at it, download also the latest Front End for Doomsday (Doomsday Engine Launcher "Snowberry" and plug-ins) that you will need to play the game, click here to download.

4. Once the file deng-1.9.0-beta6.9-setup.exe is downloaded double-click on it to install to a suitable location on your hard drive and set up the paths to the locations of all your doom games.

5. If you prefer to use the source for Doomsday version 1.8.6, then download it from the same website. However you'll to need to get Kickstart version2 instead of Snowberry to play Doom.

6. Now, fortunately, and unlike most other doom ports; with the Doomsday Engine, all the files you need to make your source code changes for the game play are compiled into one single dynamically linked library file called "jdoom.dll". That simply means, in order to create a mod, you are not forced to compile the entire solution which includes things like openGL stuff, EAX and SDL libraries ...etc, besides these are already pre-compiled for you as dlls and included in your Doomsday Engine Launcher anyway. We will take advantage of that to make life much easier for us. However in order to complete this process and produce a working dll, it needs to be linked with another file named "Doomsday.lib" .Now, there are 2 ways to get this file: you either have to compile it yourself the long and hard way, using all the procedures and resources described in part 1 or download a pre-compiled version directly from the web. I will again save you time, you may download it from here.

7. Place this file after extraction inside the "vs8" folder, on my computer, the path looks like this:

"C:\deng-1.9.0-beta6.9-source\ deng-1.9.0-beta6.9\doomsday\build\win32\vs8" See figure 1 below:

Figure 1 Paste Doomsday.lib file in vs8 folder as shown by red arrow.

8. Start up your Visual C++ 2008 Express Edition; click "File" then "Open" then "Project/Solution..." as shown in figure 2 below:

Figure 2

9. In the "open project" dialog box, set your "object type" option to "solutions" and navigate to the "vs8" folder as in figures 3 and 4 below:

Figure 3

10. Select the solution file named "doomsday.sln", click "Open". See figure 4 below:

Figure 4

11. Your doomsday project should open in VC++ 2008 Express as shown in figure 5:

Figure 5

12. Now set your Active Solution Configuration to "Release" and make sure that the platform is set to "win32", if it was not already set for you by default. See figure 6 below:

Figure 6

13. This next step is important, from the "Build" menu, click on "Configuration Manager" , as in figure 7 below:

Figure 7

14. In the dialog box that opens up, UNCHECK all the boxes in the right column as shown in figure 8 below, but make sure you leave the box for jDoom CHECKED. If you are compiling in the future for Heretic or Hexen , you can come back here and check the boxes for jHeretic or jHexen. Close this dialog box by clicking "Close". If you ignore this step, you will get a long list of "harmless" errors.

Figure 8

15. From the Solution Explorer Right-click on jDoom project and from the pop-up menu choose "Set as StartUp Project" as shown in figure 9 below:

Figure 9

16. From the Solution Explorer Right-click on jDoom project again and select "Properties" as in figure 10 below:

Figure 10

17. From the Property page that opens up and on the left click on "Configuration Properties" , then "C/C++" , then "General" and from the pane on your right that opens up, click on "Warning Level". A drop down list arrow will appear as shown in figure 11 below. From this list select "Turn Off All Warnings "or the "(/W0)" option. Click "OK" to close the box. This should hush up any warnings that may be generated from upgrading the compiler. It should not affect your work.

Figure 11

18. Finally we are ready for takeoff. Click on "Build" from the menu and select "Build jDoom" . See figure 12 below:

Figure 12

19. Your "jDoom" project should compile and build errorless as seen in the screen clip in figure 13 below. If not, then you need to check your work carefully by going over all the steps above and find out where things had gone wrong.

Figure 13 Screen clip from VC++ 2008 Express showing that build of jDoom was successful.

20.Find your freshly compiled "jDoom.dll" in a newly generated file called "bin" which is inside the "vs8" directory. See figure 14 below:

Figure 14

21. Copy this new "jDoom.dll" into the "bin" folder of Doomsday Snowberry Launcher and replace the original one in there (do not forget to back it up).

22. Start your game and enjoy. Congratulations, now you can start making your own source code mods for Doomsday with hopefully no trouble at all.

Please note that I am using WindowsXP, the images and icons on your pc may look different from mine if you are using Win7.

A final reminder: as a general rule, always make backups and always scan for viruses. If you still have problems or questions regarding the above, please drop me an email, maybe I could help.

Comments and suggestions are always welcome.

Return to Tutorials Page.

Good Luck.

Guest - - 696,008 comments

Hi, I doubt this will be answered since it's been several years but I'm so desperate I'm just asking everywhere:

I cannot get this version of doomsday to work! I keep getting an "errors occured, check the logfile (directory)"

I can install a newer version and it works but there's no jDoom.dll to replace in that one!


Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.