[OLD] Compiling the Wolf4SDL 1.9 source code

Tested On

This guide is for the version of Wolf4SDL that uses SDL1. The current version of Wolf4SDL utilizes SDL2, and the guide for setting that up can be found here.

Wolf4SDL was released in 2007, a project by DHW member Moritz "Ripper" Kroll to port Wolfenstein 3D to modern systems. While there were other notable attempts at ports like NewWolf and WinWolf3D, this particular port stood out for it's closeness to the original look and feel of the game, as well as it's relative similarities to the original source in respect to modding.

This particular port has been one of the most common for people to make games using, and is even used as the base for ECWolf.

By the end of this guide, you'll have learned how to compile the Wolf4SDL source code in one of several choices of development environments.

Editing Wolf4SDL is fairly straightforward. You'll only need two things:

The Wolf4SDL 1.9 Source Code

This is the most important aspect, as without it there's nothing to edit! Extract the folder wherever you like, but remember it's location.

A Development Environment

The program used to compile Wolf4SDL 1.9 is Dev-CPP. Installation details follow in the next step. Dev-CPP is completely free, though no longer updated. Make sure you download the correct version of the program.

Thanks to community efforts, the equivalent of this guide is available in text format within the download for the source code, titled "README-devcpp.txt".

This guide assumes you're downloading Dev-C++ 5.0 Beta 9.2 (4.9.9.2)" with Mingw/GCC 3.4.2 via this Sourceforge repository. Make sure you use this version.

Run the setup files, installing Dev-C++ to wherever you would prefer. When it's ready, run the program (devcpp.exe) and you should be greeted with a screen similar to the following:

DEV-CPP-1

This is the main environment you will be using to edit and compile your new game! Let's get started first with opening Wolf4SDL. Go to File→Open Project or File and navigate to the folder you extracted the source code to. Find and select the Wolf4SDL.dev file. This is the main project file that connects all the other source code files together.

If done correctly, the white section to the left should now be filled with a list of the project's files.

DEV-CPP-3

Now that you've got the files loaded into Dev-CPP, it's time to install some necessary extras!

As the Wolf4SDL project runs on SDL, it requires specific libraries of information to be able to compile correctly.
Fortunately, these packages are included with the Wolf4SDL download for easy implementation. Go to Tools→Package Manager and you should see the following window:

Package Library

Click the Install button within this window, and locate the folder "devcpp_devpacks" within your Wolf4SDL project. In that folder should be two files:

  • SDL_mixer-devel-1.2.6-2-mingw32.DevPak
  • SDL-devel-1.2.15-mingw32.DevPak

Choose either one, follow the prompts to complete installation, then do the same with the other. Now both packages should appear somewhere in the Package Manager's list alongside the other pre-installed packages.

DEV-CPP-5

Now that these are installed, the project should be ready to compile! Go to and click Execute→Compile and you'll see a popup, as Dev-CPP takes the source code and turns it into a usable program.

compile

If you see this, well done! Now you'll have a Wolf4SDL.exe that will function with the game. You will need to include two .dll files with your game for the executible to run (You can get these in the downloads available on the Wolf4SDL engine page). Place these files in a folder containing the game files, and it should run the game.

Congratulations, you have set up Wolf4SDL to start making changes to the game!