Over the weekend I started playing Doom 3 BFG Edition, I re-release of the mid-00s first person shooter. The reason I’m talking about this here is, as we’ve discussed before, id software who make Doom 3 have a policy of open sourcing the code for their games.
Predictably, this hasn’t posed a problem for the open source community, and bit of googling turned up a Github fork of id’s code with support for Linux. The code relies on the SDL and OpenAL libraries to handle input and audio respectively, but once those dependencies were installed, it compiled for me on Ubuntu 13.10 and 12.04 LTS with no problems.
Alongside the resulting binary, to actually play the game requires the commercial data files, which aren’t distributed freely. Since the game’s distributed using the Steam DRM system, you need to install a copy of the Windows Steam client, install the game, then copy the files in place.
It’s possible to install the game files using WINE, but I was using a laptop which happened to be dual-booting Windows so I installed the game as normal on Windows, then switched to Linux and created a symbolic link to the data files on the Windows disk partition.
There’s a few caveats to note about the open-source version of this game. Firstly, trying to run the game with AMD graphics caused the game to crash with OpenGL errors. Reading bug reports shows that this may be a problem with driver compatibility (some people have gotten it working), but using a system with NVidia graphics worked flawlessly. The game also uses a couple of non-free components which can’t be included in the GPL code: the Bink video codec and the “Carmack’s Reverse” shadow stencilling technology licensed from Creative. This means that the odd in-game video is missing, although this doesn’t really detract from the game-play as the audio still plays.
The ease with which I was able to find a solution to play this unsupported Windows game natively on Linux is a real testament to the open source community’s ability and willingness to solve and share solutions to problems. I was also really impressed by how well the game ran under these circumstances, sowing how bright a future Linux has as a gaming platform.