Playing Quake II under Linux — MultiPlayer

Quake II Multiplayer (MP)
This article explains how to play Quake II MP under Linux. Nowadays, most Quake II server run r1q2 or similar/compatible servers that use an updated version of the Q2 protocol. This means that you need a modern Q2 client to join them. This article explains how to install such a client on Linux. The majority of the quake clients mentioned here do NOT support singleplayer Q2. See this article if you want to play SP Quake II Note that you‘ll need the file pak0.pak from your Quake II CDROM because the Q2 game media is NOT free, only the source code of Quake II is free.

Free Quake II engines
There are quite a few modern Q2 clients, but most of them only have experimental Linux support atm. I tried r1q2, EGL, aprq2 and quetoo in september 2008. Quetoo worked best, that’s why I‘ll use it for this article.

NOTE: This doesn‘t mean that the other Q2 clients are worse than quetoo or that they don‘t work, but I couldn‘t get them to work properly on Linux — may be my fault (I know that r1q2 and EGL both run like a charm on win32, so does the r1q2 server under Linux). I compiled the r1q2 client under Linux, but it segfaults (crashes). EGL wouldn‘t even compile. The aprq2 client compiled and I can play MP maps at remote servers with it, but it segfaults when I try to run a map locally. So here we go, quetoo is what we use.

As mentioned above, quetoo (like the other clients mentioned above) is a Q2 engine only and you‘ll need the game media to use it. It’s easiest to have a Quake II directory containing all the game media ready and then just copy the quetoo executables there once they‘re compiled. On Debian Linux, doing the following is enough to prepare the Q2 directory (note that I assume you‘ve got pak0.pak from your Quake II CDROM as mentioned above):

# apt-get install quake2
# cp pak0.pak /usr/local/games/quake2/baseq2/

If you‘re using another Linux distribution, you may want to follow this article to prepare the Quake II directory.

Installing quetoo
The first step is to grab the quetoo source from the quetoo website. I grabbed version 0.6.1 in september 2008, the file should be named quetoo-0.6.1.tar.bz2 or similar. You‘ll then need to extract and compile it. :) Let’s get to work and extract the archive:

$ cd downloads/
$ tar xjf quetoo-0.6.1.tar.bz2
$ cd quetoo-0.6.1/

Ok, let’s now configure, compile and install quetoo. You‘ll have to tell it where the Q2 game media is — that’s the directory we prepared in the last step. On Debian Linux, this is /usr/local/games/quake2/. Locate the file pak0.pak if in doubt — it should be in the baseq2/ subdirectory of the directory you‘re looking for. I‘ll assume the Debian path from now on, adapt to your system if needed.

$ ./configure --datadir=/usr/local/games
$ make
$ su
# make install

Note that the last step has to be done as root (as indicated by the ‚#‘ in front of the command).

Coping with Library terror
If the ‚make‘ command fails, you‘re missing development versions of libraries that quetoo requires (or even a compiler and automake). To install the latter on Debian Etch, type

# apt-get install build-essential automake

You‘ll still need to install the libraries. This can be a bit tricky if this is your first compilation, but do not worry. Here’s how to cope with compile errors:

You should read the README file that comes with the software you want to compile first. It should tell you which libraries you need to compile it. Just install those from the package repository of your Linux distribution. If the README doesn‘t tell you which libraries you need, you‘ll have to find it out the hard way. :| Check the output of the ./configure command first. If this doesn‘t help and the make command fails, scroll up in the console and find the first error. You can often see or at least guess why it fails. Here’s an example error message from make:

gcc -DHAVE_CONFIG_H -I. -I.. -pipe -Wall -Werror -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/include -I/include -g -O2 -MT quetoo-gl_sdl.o -MD -MP -MF .deps/quetoo-gl_sdl.Tpo -c -o quetoo-gl_sdl.o `test -f 'gl_sdl.c' || echo './'`gl_sdl.c
gl_sdl.c:22:17: error: SDL.h: No such file or directory

As you may have guessed, we‘re missing SDL here. So search your package repository for SDL libraries. Here’s an example where I did this for Debian Etch:

# apt-cache search libsdl | grep dev
libsdl-console-dev – development files for libsdl-console
libsdl-gfx1.2-dev – development files for SDL_gfx
libsdl-image1.2-dev – development files for SDL 1.2 image loading libray
libsdl-mixer1.2-dev – development files for SDL1.2 mixer library
libsdl-net1.2-dev – Development files for SDL network library
libsdl-ocaml-dev – OCaml bindings for SDL – development files
libsdl-pango-dev – text rendering with Pango in SDL applications (development)
libsdl-sge-dev – development files for libsdl-sge
libsdl-sound1.2-dev – Development files for SDL_sound
libsdl-stretch-dev – development files for SDL_stretch library
libsdl-ttf2.0-dev – development files for SDL ttf library (version 2.0)
libsdl1.2-dev – Simple DirectMedia Layer development files

So let’s install the libsdl1.2 and libsdl1.2-dev libraries (you most likely already have the former):

apt-get install libsdl1.2 libsdl1.2-dev

Note: You need the development versions to compile, so if you need libsdl, be sure to install both libsdl and libsdl-dev (you could remove the -dev package once the compilation is complete, but you shouldn‘t unless you‘re very low on disk space because you‘ll need it to recompile the application or to compile the next version).

If everything went well, the last lint of the make output should read something like this:

make[1]: Leaving directory `/home/spirit/downloads/quetoo-0.6.1'

Congrats, you‘ve just compiled quetoo. :)

Finally: Running the game
The hard part is done and the # make install command (see above, don‘t forget it if you had trouble compiling and read the last part!) has already copied the quetoo executable to the proper directory. Just type quetoo to play Quake 2 MP.

If you don‘t see the enemies in MP you‘re missing the game data that comes with the Quake II 3.20 point release (the player models to be more specific). Get the file from the id Software FTP or a mirror and unzip it. It should be named q2-3.20-x86-full-ctf.exe — it’s not a win32 executable but a self-extracting zip archive though. Copy the pak files and the players/ directory to your quake2/baseq2/ folder.

1 Antwort auf „Playing Quake II under Linux — MultiPlayer“

  1. 1 spirit 17. November 2010 um 15:37 Uhr

    I just compiled quetoo 0.6.1 under SuSE 64bit and in that case you have to remove all occurences of ‚-Werror‘ from the file ‚configure‘ before running configure and make.

    You can also run ‚./configure --prefix=$HOME/quake2/‘ or similar if you don‘t want the files to be spread around various places.

Die Kommentarfunktion wurde für diesen Beitrag deaktiviert.