![]() | ![]() |
|
LinuxGL (GLX) QuakeWorld Client compile mini-HOWTORobert B Easter reaster@comptechnews.com
1. IntroductionThis miniHOWTO is about how to get the OpenGL/GLX Linux QuakeWorld client compiled and working on systems with standard OpenGL hardware acceleration support. This procedure was developed while struggling to get glqwcl.glx to work on a system with Linux Slackware 7.0 (2.2.16), XFree86 4.0.1, a GeForce 256 DDR video card, and NVIDIA's 0.9-4 MesaGL drop-in replacement lib/driver (libGL.so.1.0.4). 1.1. New Versions of this DocumentThe lastest version of this mini-HOWTO can be found at: http://www.linuxdoc.org/HOWTO/mini/LinuxGL-QuakeWorld-mini-HOWTO/ If you'd like a ready to compile distribution of QuakeWorld that has this HOWTO's procedures performed on it already, then you can download it at: 1.2. Copyright InformationThis document is copyrighted (c) 2000 Robert B. Easter and is distributed under the terms of the Linux Documentation Project (LDP) license, stated below. Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. If you have any questions, please contact <linux-howto@metalab.unc.edu> 1.3. DisclaimerNo liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements. 2. QuakeWorld clientsIf you'd like a ready to compile distribution of QuakeWorld that has this HOWTO's procedures performed on it already, then you can download it at: http://www.comptechnews.com/~reaster/index.html#games Otherwise ... It seems that the glqwcl.glx binary available at least at www.quakeworld.net in the package qwcl-2.30-glibc-i386-unknown-linux2.0.tar.gz is not compiled properly since on startup, it looks for libglide2x.so. QuakeWorld clients come in several flavors:
If you happen to have an Nvidia card and are interested in a complete HOWTO for installing the Nvidia drivers and an assortment of OpenGL libraries (GLU, glut, Qt, OpenGL man pages), then see the NVIDIA-OpenGL-Configuration_miniHOWTO at: http://www.linuxdoc.org/HOWTO/mini/Nvidia-OpenGL-Configuration-mini-HOWTO/ 3. Download the Quake sourceDownload the Quake source code, q1source.zip, from ftp://ftp.idsoftware.com/idstuff/source/q1source.zip. This zip file contains all versions of Quake1/QuakeWorld. After compiling (read on first!), you will get version:
Make a directory to hold the quake source:
4. Modify the MakefileThe Makefile can use cleaning up and the removal of all Mesa references since the GLX version does not need it. Rather than provide a line by line account of what I did to change the original Makefile, the modified Makefile that I used, and a patch against the original Makefile.Linux to obtain my version of the Makefile, are provided below.
Figure 1. Makefile, cleaned up for compiling the GLX version.
The following is a patch that you can apply to the original Makefile.Linux if you feel like it. The command is simply:
http://www.comptechnews.com/~reaster/mini-HOWTO/LinuxGL-QuakeWorld-mini-HOWTO/Makefile.Linux.patch
Figure 2. Makefile.Linux.patch
Save the Makefile. 5. Fix the mouse grabbingFix the mouse hide problem. The quake code, as it is, does not hide the mouse when you use it. The pointer would remain visible and jitter around a fixed point in the middle of the screen - very annoying. I found the following simple fix in a mail archive about glx development at: http://lists.openprojects.net/pipermail/glx-dev/1999-October/000994.html See the patch listing and the link to download it below, or you can make the changes yourself.
At the top of the function called install_grabs(void) (Line 234), add the following code:
The 8th parameter to XGrabPointer should be changed from "None" to "cursor" to use the blank cursor:
This fix might work for the other client builds if you make similar changes in the appropriate *vid*.c file. As it is, this creates a memory leak as it allocates another Cursor object everytime through and doesn't call XFreeCursor() but this is probably not a problem since I don't think a 1x1 cursor is using much memory. If you want, you can apply the following patch against q1src/QW/client/gl_vidlinuxglx.c (patch gl_vidlinuxglx.c patchfile). Just cut and paste the contents between the begin/end patchfile lines into a file called gl_vidlinuxglx.c.patch (or whatever you want to call it). Save patchfile in the q1src/QW/client directory where gl_vidlinuxglx.c is. Then run the command:
This patch file will make gl_vidlinuxglx.c such that it doesn't have any memory leak. You can download this patch file at: http://www.comptechnews.com/~reaster/mini-HOWTO/LinuxGL-QuakeWorld-mini-HOWTO/gl_vidlinuxglx.c.patch.
It is handy to bind some keys at the quake console to toggle mouse grabbing:
6. Compile!Compile (finally!) Just run make with no parameters from where the Makefile is located:
If all goes well, you will have a binary, glqwcl.glx, in the releasei386-glibc directory. Copy glqwcl.glx to another directory (like "qw") and then from a Quake cd or other quake installation, copy the id1 directory and any other game directories you like/have - ctf, Fortress etc - to your new quakeworld directory. 7. Running glqwcl.glxRunning the game. You might want to run it like this from XQF: glqwcl.glx -width 1280 -height 1024 (or any other resolution your system can support) XQF is a nice program to find QuakeWorld servers and can be found at: http://www.linuxgames.com/xqf To run the game fullscreen requires starting the game at the same resolution as your X desktop. If you are running a desktop environment, you might not be able to hide everything. The sure way to get a fullscreen experience is to run XFree86 on its own without any desktop environment or window manager loaded:
Light effects. At the console, you can try turning on and off the flashblend function and see which lighting effects you prefer:
When it is on (1), you may notice colored light effects around flags and special items. In this mode, you may NOT see flashes from weapons and light on the walls from rockets. The exact effects of toggling flashblend may depend on your specific OpenGL installation. When it is off (0), there may not be any COLORED light, but otherwise all light effects work. Flags and special items have a glow around them and light up surrounding surfaces. Weapons flash when fired and rockets light up everything around them as they travel. HAVE FUN! |