DEV Community

Cover image for TIL DOOM 3 Source Compilation
Sunder Iyer
Sunder Iyer

Posted on • Updated on

TIL DOOM 3 Source Compilation

2021-05-11

For fun, I decided to check out id Tech 4. Instead of using id's repo, I was turned on to RBDOOM 3 which is a modern version. Fortunately, I found this guide which made my life 100x easier.

Following the guide, I cloned the master branch (using GitHub Desktop). I had Visual Studio 2019 already installed which fortunately RBDOOM 3 supports. The next step was to install cmake which I found here. I deviated from the guide and didn't use msi, opting for the zip version. This meant I had to ensure cmake's bin folder was in my PATH variable.

Then I generated the solution using one of the existing batch files, opting for cmake-vs2019-64bit-windows10.bat.
Screenshot of batch files

Deviating a little from the guide once more, I skipped ahead and immediately opened the RBDoom3BFG solution generated in the new build folder which opened up with no issues in VS2019. Without changing anything, I built the solution and this produced an RBDoom3BFG.exe in a Debug folder. Attempting to run this produced missing DLL errors which I took note of.

Returning to the guide, I jumped to the step I skipped and grabbed ffmpeg-4.4-full_build-shared.7z from gyan.dev. The necessary DLLs are in the bin folder which I placed alongside the RBDoom3BFG.exe file:

  • avcodec-58.dll
  • avformat-58.dll
  • avutil-56.dll
  • swresample-3.dll
  • swscale-5.dll

Or you could copy all the dlls like the guide suggests.

Upon running the game, I ran into the same error as the guide depicted and instead of copying just default.cfg, I copied the whole RBDOOM-3-BFG\base\ folder into my Saved Games folder.

Finally it was time to ensure the game assets were available to the build. The game's on sale right now on Steam. Install the game and find its base\ folder where all the assets reside. The guide suggests copying it but I used junctions instead. Using junctions would mean that I can potentially ruin my game files but since I don't intend to play the game it should be okay.

Unfortunately after all this, DOOM 3 still didn't run. I got this error.
Error while linking glsl program

It turns out that the game tried to run with my system's integrated graphics processor which does not support OpenGL 4.5 which RBDOOM 3 now needs. Indeed, it complained about failing to make OpenGL 4.5 contexts and falling back to OpenGL 4.3. Fortunately I was able to specify which GPU to use.
Use the right-click menu to set the GPU

Upon changing to the better graphics card, the game finally ran. I loaded up a dev map.
Game Capture
Rip and Tear, anyone?

Top comments (0)