Saturday, December 29, 2007

3.7 The OpenGL Renderer
Hardware−accelerated OpenGL Quake is Quake the way God intended it to be. There is no substitute, and
once you've experienced it there's no going back.
To run Quake II in GL mode, you need a 3D card with the Voodoo, Voodoo2 or Voodoo Rush graphics
chipset on it. There are specific issues to be dealt with if you have a Voodoo Rush card, and I won't go into
them now because frankly, I wouldn't know what I was talking about. A future version of this HOWTO will
cover Rush issues (If somebody wants to write about Voodoo Rush issues, I'll gladly include it here).
The SVGAlib, Glide, and Mesa libraries must all be installed and configured properly on your system for
quake2 to work. The following sections will very briefly cover what you need to do to get them going.
Bernd Kreimeier's ( bk@gamers.org) Linux 3Dfx HOWTO (
http://www.gamers.org/dEngine/xf3D/howto/3Dfx−HOWTO.html) is good source for further information.
The 3dfx.glide.linux newsgroup on the 3dfx news server (news.3dfx.com) is another good source of
information about the intersection of Linux, glide, Mesa and Quake.
SVGAlib
Quake II uses SVGAlib to get input from the mouse and keyboard, so you'll need to configure it as outlined
in section SVGAlib Renderer.
Glide ++
Glide is a library that provides an API for programming 3Dfx based cards. If you want the Mesa graphics
library to use your 3Dfx card, you've gotta have it.
Do NOT use the Linux Glide library distributed at 3Dfx's web site. It's more than a year out of date. You're
bound to have problems if you try to use it. The latest version of glide can always be found at
http://glide.xxedgexx.com/3DfxRPMS.html. Select the package(s) appropriate for your system, and install
according to the instructions on the web page.
Note that unless you download the 3Dfx device driver package in addition to the Glide library, you will only
be able to run Glide applications (like Quake II) as root. Install the /dev/3dfx module and you can play
Quake II as a regular user. PentiumPro/Pentium II users have an additional incentive for downloading this
driver: it can dramatically increase your framerate. The driver enables support for MTRRs, a
memory−caching feature of these CPUs. See http://glide.xxedgexx.com/MTRR.html for a better explanation
of this feature.
Once you have glide installed, try out the test program that comes with it. Remember this program: it's a good
way to reset your display if you ever have a glide application (like Quake II) crash and leave your screen
switched off. NOTE: run this test from a VC, not X! It's possible for the test app to lose mouse and
keyboard focus in X, and then you'll have no way of shutting it down.
/usr/local/glide/bin/test3Dfx
Linux Quake HOWTO
3.7 The OpenGL Renderer 23
Your screen should turn blue and prompt you to hit any key. After you press a key you should be returned to
the prompt. 3dfx.glide.linux on 3dfx's news server (news.3dfx.com) is a great source of information for Linux
glide−specific problems.

Monday, December 17, 2007

The SVGAlib Renderer ++

You need SVGAlib installed and configured if you're going to use either the ref_soft or ref_gl renderers.
(Quake II uses SVGAlib to process keyboard and mouse input, in case you're wondering why you'd need it
for the GL renderer). SVGAlib comes with most modern distributions, and must be properly configured
before Quake II will run correctly outside of X.
libvga.config is SVGAlib's configuration file. On most systems you'll find it in either /etc or
/etc/vga. Make sure the mouse, monitor, and video card settings in this file are correct for your system.
See the SVGAlib documentation for more details.
If you don't already have SVGAlib on your system, download it from the location mentioned in the files
section above.
You should run Quake II from a virtual console when using the ref_soft or ref_gl renderers. It won't run from
X unless you're root when you start it, and that's not advisable. So if you're in X, do a CTRL+ALT+F1, login
and then:
cd /usr/local/games/quake2
./quake2 +set vid_ref soft
Running SVGA and GL games from X in the Tips & Tricks section below explains how to launch SVGA and
GL Quake II from X without manually switching to a virtual console.
Linux Quake HOWTO
Quake2.conf 22

Saturday, December 15, 2007

The X Renderer

Quake II should be ready to run under X now. Give it a try:
cd /usr/local/games/quake2
./quake2 +set vid_ref softx
If all is well, after a pretty significant pause, a small Quake II window will appear with the first demo running
in it. You should hear sound effects and possibly music, if your CD is in the drive. If any of this fails to
occur, please see section Troubleshooting for help.

Thursday, December 13, 2007

Setting Permissions

If you ran rpm or tar as root when installing the Quake II package on your system, the file permissions
should be properly set already. The quake2 executable was installed setuid root so that it can access the
graphics devices on your system. For security, the ref_*.so rendering libraries are owned by root and
writeable only by him. If root doesn't own the libraries, or they're world writeable, quake2 will refuse to
run.
If you plan to only run Quake II with the GL or X renderers, your quake2 doesn't need to be setuid root. See
Running X and GL games without setuid in the Tips and Tricks section below for information on running
Linux Quake HOWTO
3.3 Adding the Linux Binaries 21
Quake II without root permissions.
Quake2.conf
For security reasons, there is a quake2.conf file, which tells Quake II where to find the rendering libraries
(ref_*.so) it needs. It contains only one line, which should be the path to your Quake II installation.
Quake II looks for this file in /etc. If you installed Quake II from an .rpm file, this file was installed for
you. If you installed from a .tar package, you need to create it like so:
su root
cd /usr/local/games/quake2
pwd > /etc/quake2.conf
chmod 644 /etc/quake2.conf

Tuesday, December 11, 2007

Adding the Linux Binaries

There are four Linux Quake II packages available for download:
a libc5 tar.gz package •
a glibc tar.gz package •
a libc5 rpm package •
a glibc rpm package •
Install just one of these packages. Each contains the same files, they're just linked against different libraries.
Redhat 5.x users should choose the the glibc rpm package. Users of glibc based systems without rpm support
should use the glibc tar package. The libc5 rpm is for Redhat distributions prior to 5.0 and other distributions
that use the rpm package format. The libc5 tar.gz package is for Slackware and everyone else.
See the Download the Necessary Files section for the location of the Linux Quake II files.
Installing the RPM packages
Installation of the rpm packages should be as simple as:
su root
rpm −Uvh quake2−xxxxx.i386.rpm
Rpm may complain that it can't find libglide2x.so. The Glide library is only necessary if you have a
3Dfx card and want to run Quake II in GL mode. If you don't plan to use the GL mode, you can override the
glide dependency with the −−nodeps option:
su root
rpm −Uvh quake2−xxxxx.i386.rpm −−nodeps
Installing the tar.gz packages
To install, just untar the file in your Quake II directory. Do it as root so the proper file permissions get set:
cd /usr/local/games/quake
su root
tar −xzf qwcl2.21−i386−unknown−linux2.0.tar.gz

Saturday, December 08, 2007

Installing the demo version

id Software has a freely available demo version of Quake II at their ftp site. It's a 40 megabyte download. The
demo includes all features of the full version, including multiplayer, but it only comes with three levels, so it
may be difficult to find a server to play on.
See the section Download the Necessary Files above for the location of the Quake II demo. Download it and
place it in your Quake II directory.
The demo distribution is a self−extracting zip file (it's self−extracting in other OS's anyway). You can extract
it with the unzip(1) command, which should be included in most modern distributions. If you don't have
unzip, you can download it from the location listed in the Download the Necessary Files section.
cd to your Quake II directory and extract the archive:
cd /usr/local/games/quake2
unzip q2−314−demo−x86.exe
Now we've got to delete some things and move some other things around:
rm −rf Splash Setup.exe
mv Install/Data/baseq2 .
mv Install/Data/DOCS docs
rm −rf Install
rm −f baseq2/gamex86.dll
The Quake II demo is now installed. You just need to add the Linux binaries.
Linux Quake HOWTO
Installing the demo version 20

Labels:

Tuesday, December 04, 2007

Windows to Linux install

If you have Quake II installed under Windows on a different machine, you can transfer the files in
quake2\baseq2\ to your Linux system via FTP or some other mechanism. Keep in mind that the
filenames on your Linux system must be in lower case for Quake II to find them, so you may have to rename
them after the transfer. Also note that it may be necessary to delete your Windows installation after you do
this to remain in compliance with the terms of id's software license. It's not my fault if you do something
illegal.
If your Windows and Linux systems are on the same machine, you have two options: copy the files from your
Linux Quake HOWTO
Installing from CD 19
Windows partition to your Linux partition, or link to the necessary files from Linux. Both options will work
equally well. You'll just save a lot of disk space when you link instead of copy. As usual, replace
/win95/games/quake2 in the following examples with the correct path to your Windows partition and
Quake II installation.
If you want to copy the files from your Windows partition, do something like this:
cd /usr/local/games/quake2
cp −r /win95/games/quake2/baseq2 .
•
To create links to your Windows Quake II files instead, do this:
cd /usr/local/games/quake2
ln −s /win95/games/quake2/baseq2 .
This second method requires that the Windows partition you're linking to be writeable by users,
which may not be appropriate for all systems. By making your Windows partition writeable, you are
giving all users the opportunity to destroy your entire Windows installation. If that's ok with you,
modify your /etc/fstab to mount the Windows partition with the options umask=002,gid=XXX,
where XXX is the group id number of the "users" group. Look in /etc/group for this information.
When fstab is updated, umount and re−mount the Windows partition and you're done.
•
You're done installing the Quake II data files. Move ahead to " Installing the Linux Binaries".

Labels:

Sunday, December 02, 2007

Installing from CD

Place your Quake II CD in your CD ROM drive, and mount it:
mount −t iso9660 /dev/cdrom /mnt/cdrom
If your CDROM is typically mounted elsewhere, substitute its location for /mnt/cdrom. If you're not sure
where your CDROM is mounted, please see the documentation for your particular distribution.
Full Install The simplest install method is a "full" install, which involves copying the entire contents
of your CD to your hard drive. This requires about 350 MB, and is accomplished by issuing the
following commands:
cd /usr/local/games/quake2
cp −r /mnt/cdrom/Install/Data/* .
There'll be a bunch of unnecessary Windows files hanging around that you can safely delete:
rm −f /usr/local/quake2/*.dll
rm −f /usr/local/quake2/quake2.exe
rm −f /usr/local/quake2/baseq2/gamex386.dll
•
Medium Install If 450 MB is too much space for you to devote to Quake II, you can skip installing
the movie cutscenes and link to them on the CD−ROM instead. This will reduce the space
requirements to about 200 MB:
cd /usr/local/games/quake2
mkdir baseq2
cp /mnt/cdrom/Install/Data/baseq2/pak0.pak baseq2
cp −r /mnt/cdrom/Install/Data/baseq2/players baseq2
ln −s /mnt/cdrom/Install/Data/baseq2/video baseq2/video
Note that this doesn't mean you have to mount your Quake II CD every time to want to play Quake
II. If the game can't load the videos, it just won't display them.

Labels: