HOWTO... Make a Quake II client running under LinuxIntroductionThis Howto will describe what one has to do when installing Quake 2 for playing under Linux. We will talk about general stuff as well as about different possible clients for Quake 2. Saying this, it's actually sure this document may change very often as clients change too. The only thing that remains the same is the system. It's Linux - an often overseen system concerning gaming. It's ready for gaming - and it's been ready for Quake 2 for ages. Many things have changed so far so we're going to write a Howto that considers todays clients and specialities.You won't find any information about Windows stuff here. Don't try to bug us with Windows-questions as they often are system-self-made conceptual problems and thus, plain stupid. Index- ATI or nVidia?- a general Q2-installation
- Authors own comments and recommendations - Contact - Credits ATI or nVidia?The market of graphic processor vendors is split into three. Intel, the biggest one followed by ATI and then NVIDIA. We're talking about the whole graphic processor market. This doesn't necessarily mean that it's best to have an Intel GPU at your Linux box. We rather propose you to have an NVIDIA card, since the NVIDIA Linux drivers just work nicely. We had many troubles already to get ATI to work on Linuxes... perhaps they should improve there. Talking of Intel GPUs they are more wide-spread around notebooks, servers, thinclients but not really established among gamers.So final word: Even though ATI cards are cheaper and have some really comparable power to nVidia, we prefer nVidia over ATI for Linux :) a general Q2-installationA general Q2-installation consists of the base-directory ./ and the sub-directories for specific games... The standard q2-game-directory is always called "./baseq2". The base-directory is supposed to have the quake2-client that runs the games. So if you want to run the single player "game" you just need to start the quake2-binary since the baseq2 is assumed to be the default-game. :)If you want other games, you can change the game-directoy by typing "game mygamedir" at the console or start your Quake 2 with the commandline paramater "+set gamedir mygamedir". The gamedir optionally has directories like ./demos, ./save and ./scrnshot or ./screenshots and depending on different artworks needed for the game there's ./textures, ./sounds, ./players etc. :) To have a more compact overview of gamedirs, so called PAK-files may contain those files as well. To tell the clients in which order PAK-files have to be loaded, their naming-scheme looks like pak0.pak to pak9.pak (depending on the client unlimited and even other named PAK-files are allowed). You get the picture of: ./baseq2 ./baseq2/save ./action ./action/players ./action/scrnshot ./action/demos Gamedirs and gamei386.soGenerally, every gamedir has a "gamei386.so". The gamei386.so is just the file that carries the logic that Quake 2 has to load before you can play with Quake 2. On Windows, that file is called "gamex86.dll".Thus said, Quake 2 has a very modular structure and perhaps that is why Quake 2 became so popular in a short time. Third-party games came up and bound the gamers to their chairs. :) Nevertheless there are some problems with gamei386.so Linux-capable clientsFor the moment, there are not sooo much Linux-capable clients, and yet not very many to offer a decent multiplayer experience. Then again one offers features that the other one doesn't. Whatever, here's the short list:- Icculus Q2 (http://icculus.org/quake2/) - AprQ2 (1.17) (http://apprime.0wns.org/q2) - R1Q2 (http://www.r1ch.net/stuff/r1q2/) - tricky
Icculus Q2The Icculus build of Quake 2 offers a very basic set of features that every Quake 2 client should normally have. Easy speaking it's a 100% port of the original windows version PLUS many technical additions and bugfixes to it. For example the ALSA sound support is a very good one for which every other Quake 2 client should strife to. Arts (the KDE sound server) sound support may be a nice addition too but is not that exciting considering the fact that on todays kernels Arts in the end only gives the sound back to ALSA. And so does the SDL support - but SDL offers an cross-plattform graphic API too.. so, talking about games, SDL is considered a better choice. And talking about sounds, a direct ALSA support is better than SDL sound.Whatever, the Icculus Q2 is build with portability im mind, so you could even be able to play it on Solaris and x86 64bit processors. Here (http://www.icculus.org/quake2/#download) Icculus lists possible binary distributions to try. You can either chose the loki installer or use a RPM-package... yet that's a bit unsatisfying, that is why we chose the source-way :) making sure the build is compatible with our system. Create a source directory, change into and get the current sourcepackage: $ wget http://www.icculus.org/quake2/files/quake2-r0.16.1.tar.gz Extract it: $ tar xzvf quake2-r0.16.1.tar.gz Change into the newly created quake2-r0.16.1 directory: $ cd quake2-r0.16.1 Compile the whole icculus Quake 2 build: $ make If it complains and fails to compile for some reason, then you most likely don't have the needed packages installed that Icculus wants to build support for. Just edit the "Makefile" and chose the appropriate support you want by adjusting the variables. BUILD_SDLQUAKE2=NO for example if you don't want SDL support at all. Re-start the making process by typing "make" again. After building there's a "releasei386" directory where you will find all the binaries. Copy them to your gamedirectory (cp xxx yyy) or make symlinks (ln -s xxx yyy). AprQ2AprQ2 has about all the eyecandy the other clients have when combined, and some userfriendly stuff. It's also the only client atm that has xmms/bmp commands. Maniac will probably listen to any kind of possible improvements concerning the user interface or such. Unlike R1Q2, this client doesn't have a release almost weekly. Usually there's a release with a larger number of new things and many tweakings. The renderer is implemented and thus isn't available to be used with other clients. AprQ2 comes with two executables, one for gl and one for software, and the software one is the best to be used, if a must. AprQ2 is the client supporting about anything, but not yet the protocol 35 that R1Q2 uses.First, you will probably need to downgrade your libpng to 1.2.1, after that it should all be so simple. Get the source package: $ wget http://apprime.0wns.org/q2/aprq2_v1.17_src.zip Unzip it: $ unzip aprq2_v1.17_src.zip Change into the source directory: $ cd aprq2_v1.17_src In case you wish to change the things to compile, edit the makefile. Though you probably won't need to change anything, atleast not with this version. Then we compile the source: $ make If the compilation fails, you're probably missing some libraries. Update your libraries (but not libpng) and rum the compilation again with make. Now that it's compiled, copy everything from releasei386/ to your q2 directory: $ cp releasei386/* /your/quake2/folder/ R1Q2R1Q2 is a client that not only adds features for gameplay like locfile-support, but also some technical improvements to the game. R1Q2 corresponds to the R1Q2 dedicated server very well. If you connect to a R1Q2 dedicated server the client will chose to use another protocol. R1CH, the author of R1Q2 is a performance, stability and security zealot and always tries to find new possible ways to optimize play over a network. So R1Q2, the client itself, can truely be called technology leader of all the Quake 2 clients out there.And since Quake 2 always had a modular layout concerning the possible renderers, you can chose whatever renderer you want for R1Q2. Of course people should go for R1GL which is a renderer with the same design goals as R1Q2 from R1CH. Yet, there's only a R1Q2 client linux version released and building the renderer R1GL is a bit tricky. To build the client on linux, get the latest source package of http://www.r1ch.net/stuff/r1q2/src/ ... Create a source directory like: ./r1q2-5510/ change into there and get the source: $ wget http://www.r1ch.net/stuff/r1q2/src/r1q2-b5510-src.zip Extract it: $ unzip r1q2-b5510-src.zip Apply the patches of turol to the 5510 package from here: http://koti.mbnet.fi/~turol/r1q2/ The make-process won't finnish if you don't apply those patches for building OpenAL support.. for some reason R1CH forgot to pull the files in. Oh and ... make sure you have OpenAL installed! If you don't want to install OpenAL for positional audio at all, then edit the Makefile in ./binaries/client/ to NOT have the line with "-DUSE_OPENAL". Anyways, go on: $ cd linux $ wget http://koti.mbnet.fi/~turol/r1q2/al_linux.c http://koti.mbnet.fi/~turol/r1q2/al_linux.h http://koti.mbnet.fi/~turol/r1q2/qal_linux.c $ cd .. Then, to fix an issue with the "cl_async" command, we have to apply a .diff file to cl_main.c in the "client" directory: $ cd client $ wget http://koti.mbnet.fi/~turol/r1q2/linux-async.diff $ patch -F3 < linux-async.diff $ cd .. Now, to finally make it, change into the client binaries directory: $ cd binaries/client/ Build it: $ make After building is over, a "quake2" binary has been build. Now change back to your Quake 2 game base-directory and make a link to this newly built R1Q2 binary: $ cd ~/Games/quake2 $ ln -s ./r1q2-5510/binaries/client/quake2 r1q2 Your gamedirectory now has a file that's called "r1q2" and links to the quake2-binary we just have been build. So far for the client - but we still need a renderer for Quake 2 to run.. go on with SDLquake2 or use a renderer of the Quake2Forge package below. A typical R1Q2 startingline would be - notice the "sdlgl" renderer line taken from SDLQuake2. $ ./r1q2 +set vid_ref sdlgl +set gl_driver /usr/lib/libGL.so Note: R1Q2 doesn't support SDL-Sound (for users that want Quake2 to use ALSA) out of the box. If you want ALSA support, it's recommended to use SDLQuake2 (based on r1q2) in general. SDLQuake2Create and change into another directory for making SDLQuake2 :) and download the latest SDLQuake2 of turol there:$ wget http://koti.mbnet.fi/~turol/sdlquake2/sdlquake2-0.1.4.tar.bz2 Extract it: $ tar xjvf sdlquake2-0.1.4.tar.bz2 This will create another directory with all the files in it. Change into it: $ cd sdlquake2-0.1.4 Be sure to review the Makefile since on the second line it contains: CFLAGS:=-O3 -ffast-math -march=athlon-xp -g -Wall $(shell sdl-config --cflags) Change "-march=athlon-xp" to your CPU-architecture.. Well, if you don't know what architecture you have, just put "i386". Then make it: $ make After making process you will have a "quake2" binary as well as a "ref_sdlgl.so". Our main focus is the "ref_sdlgl.so". Rember its location. Change back to your gamedirectory and create a link to the files: $ cd ~/Games/quake2 $ ln -s ./sdlquake2-0.1.4/quake2 sdlquake2 $ ln -s ./sdlquake2-0.1.4/ref_sdlgl.so Well done, you now have a SDL renderer for your R1Q2 package and even a fully capable SDL Quake 2 client that even has SDL sound to use ALSA. A typical SDLQuake2 startingline would be: $ ./sdlquake2 +set vid_ref sdlgl +set gl_driver /usr/lib/libGL.so Quake2ForgeQuake2Forge may rather be called a proof of concept than a real alternative for linux gamers that want a nice multiplayer and single player client. They have some nice approachs as like Icculus' build - doing things with ALSA and SDL. If you want to try it, even though it is now over a year old and had no undergoing development since then, go on:Get the source: $ wget http://www.quakeforge.net/files/quake2forge/quake2-0.3.tar.gz Extract it: $ tar xzvf quake2-0.3.tar.gz Change into the source directory: $ cd quake2-03 Build it: $ aclocal $ automake $ ./configure $ make After building you most likely will have different renderers in (./src/.libs/) available: ref_soft.so, ref_softx.so, ref_softsdl.so, ref_glx.so, ref_tdfx.so, ref_sdlgl.so Having the soundssupport as libraries is one of the improvements of Quake2Forge - it's just more modular: snd_alsa.so, snd_ao.so, snd_oss.so, snd_sdl.so The soundsupport libraries are located in ./src/.libs/ as well. Good, so I would chose: ref_sdlgl.so and snd_alsa.so :) To install it, you would need root privileges: # make install Remember the directory where it installed it to. So, later, copy it whereever you really want it to be. OR, with user-privileges, just copy the files you want out of the ./src/ and ./src/.libs/ directories to your home-directory. Small tips/other things- Windows uses the basic US keyboard layout for Quake 2. On Linux your client will use the same layout on all X programs. This won't be that big a change for qwerty users, just that the smileys aren't where they were in Quake 2 before. Ofcourse you can use that US layout if you wish.- The "s_khz" doesn't work in Linux clients. Use "sndspeed" instead. The value should be in hz, so eg "s_khz 44" would be "sndspeed 44100" - The default gl renderer for AprQ2 is glx, in case you're having problems with this. - Many people asked how to make applications to mix the sound together. Quake2?, XMMS and TeamSpeak is an often wanted configuration. First off, TeamSpeak has no ALSA (only stupid OSS) support which makes life harder. ALSA can mix sound in software but TS has no ALSA support, so it wants to access the soundcard via OSS exclusively .. and that is why you will need a soundcard that is capable of hardware mixing. Any Soundblaster Live! with EMU chipset can do that (watch the EMU chipset! There's one Soundblaster Live! that has NO EMU chipset.). Then, you will need to adjust some settings on your ALSA-system if your quake2 version has no ALSA support (Note: SDLQuake2 has ALSA over SDL): echo r1q2 0 0 direct > /proc/asound/card0/pcm0p/oss echo r1q2 0 0 disable > /proc/asound/card0/pcm0c/oss This will tell ALSA, that, if the binary "r1q2" wants to access OSS (/dev/dsp) it should be routed directly to the soundcard... and the soundcapturing should be disabled. We disable soundcapturing and make playback directly since TeamSpeak wants to have exclusive access to these itself. The current TS version sucks there. Please tell the developers they should create ALSA support for their software. Set XMMS to use the ALSA output plugin. You won't need to have a soundcard capable of hardware mixing if every application had ALSA support. Quake2? and XMMS can have ALSA support, but TeamSpeak has not (yet). Authors own comments and recommendationsHaudraufwieniX suggests: AprQ2 and R1Q2 are the real Quake 2 client flagships for todays multiplayers around the world. Many people like AprQ2 for the graphical features like improvements of the hud. Anyways R1Q2 has numerous improvements that cooperate with the wide-spread R1Q2-dedicated and thus has many advantages in its network code. It's a real multiplayer client with many performance tweaks and new cvars as well. I stick to R1Q2.ImEiZ (this page required uppercase letters, so lame it is. my nick is imeiz. ;>) suggests: AprQ2, been using it since about the first version. It's not only that AprQ2's had some nice graphical stuff, but it's so userfriendly too. ContactNo phonecalls or fanmail. You can find us both in IRC, #aq2world @ QuakeNet.CreditsI want to thank the client developers in AQ2-scene, Maniac- and R1CH. And Haui's mom too. -imeiz(c) copyright 2005 Paul Klumpp (QuAd|Haui) and Sebastian Salminen (imeiz). Please link here. If you want to quote, you must give credit. Don't copy and declare as your own stuff. All Rights Reserved. |