The Linux Gamers' HOWTO

Peter Jay Salzman

p@dirac.org

2002-02-22 v.0.9.10


Table of Contents
1. Administra
1.1. Authorship and Copyright
1.2. Acknowledgements
1.3. Latest Version and Translations
2. Definitions: Types Of Games
2.1. Arcade style
2.2. Card, logic and board games
2.3. Text Adventure (aka Interactive Fiction)
2.4. Graphical Adventures
2.5. Simulation (aka Sims)
2.6. Strategy (aka Strats)
2.7. First Person Shooter (aka FPS)
2.8. Side Scrollers
2.9. Third Person Shooters
2.10. Role Playing Game (aka RPG)
3. Libraries
3.1. What is Glide2?
3.2. What is Glide3?
3.3. What is OpenGL?
3.4. What is Mesa?
3.5. What is DRI?
3.6. What is GLX?
3.7. What is Utah GLX?
3.8. What is xlib?
3.9. What is SDL (Simple DirectMedia Layer)?
3.10. What is GGI?
3.11. What is SVGAlib? Frame buffer? Console?
3.12. What is OpenAL?
3.13. What is DirectX?
4. Definitions: Video Card and 3D Terminology
4.1. Textures
4.2. T&L: Transform and Lighting
4.3. AA: Anti Aliasing
4.4. FSAA: Full Screen Anti-Aliasing
4.5. Mip Mapping
4.6. Texture Filtering
4.7. Point Sampling Texture Filtering
4.8. Bilinear Texture Filtering
4.9. Trilinear Texture Filtering
4.10. Anisotropic Texture Filtering
4.11. Z Buffering
5. XFree86 and You
5.1. Getting information about your X system
6. Various Topics
6.1. Memory Type Register Ranges
6.2. Milking performance from your system for all it's worth
6.3. About libraries on Linux
7. When Bad Things Happen To Good People
7.1. RTFM!
7.2. Look For Updates and Patches
7.3. Newsgroups
7.4. Google Group Search
7.5. Debugging: call traces and core files
7.6. Saved Games
7.7. What to do when a file or library isn't being found (better living through strace)
7.8. Hosed consoles
8. Hardware
8.1. Which video card is the best?
8.2. Which sound card is best?
9. Miscellaneous Problems
9.1. Hardware Acceleration Problems
9.2. Hardware acceleration works only for the root user
9.3. Why isn't my sound working?
10. Emulation and Virtual Machines
10.1. Apple 8-bit
10.2. DOS
10.3. Win16
10.4. Win32
11. Interpreters
11.1. SCUMM Engine (LucasArts)
11.2. AGI: Adventure Gaming Interface (Sierra)
11.3. SCI: SCript Interpreter or Sierra Creative Interpreter (Sierra)
11.4. Infocom Adventures (Infocom, Activision)
11.5. Scott Adams Adventures (Adventure International)
11.6. Ultima 7 (Origin, Electronic Arts)
12. Websites
12.1. Meta gaming websites
12.2. Commercial Linux Game Websites
12.3. Other Websites Of Note

1. Administra

If you have ideas, corrections or questions relating to this HOWTO, please email me. By receiving feedback on this howto (even if I don't have the time to answer), you make me feel like I'm doing something useful. In turn, it motivates me to write more and add to this document. You can reach me at . My web page is www.dirac.org/p and my Linux pages are at www.dirac.org/linux. Please do send comments and suggestions for this howto. Even if I don't take your suggestions, your input is graciously received.

I assume a working knowledge of Linux, so I use some topics like runlevels and modules without defining them. If there are enough questions (or even protests!) I'll add more basic information to this document.


1.1. Authorship and Copyright

This document is copyright (c) 2001 Peter Jay Salzman, . Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1, except for the provisions I list in the next paragraph. I hate HOWTO's that include the license; it's a tree killer. You can read the GNU FDL at www.gnu.org/copyleft/fdl.html.

If you want to create a derivative work or publish this HOWTO for commercial purposes, contact me first. This will give me a chance to give you the most recent version. I'd also appreciate either a copy of whatever it is you're doing or a spinach, garlic, mushroom, feta cheese and artichoke heart pizza.


1.2. Acknowledgements

Thanks to Mike Phillips who commented extensively on the howto. Thanks to Dmitry Samoyloff, , for translating this document into Russian. It blew my mind when he told me that he was translating my words to Russian.


2. Definitions: Types Of Games

Not everyone knows the different types of games that are out there, so in an effort to form a common language that we can all use, I'll run through each game type and provide a very brief history.


2.3. Text Adventure (aka Interactive Fiction)

Once upon a time, when Apple ][, Commodore, and Atari ruled the world, text adventures were the game of choice of `intelligent folk'. They were self contained executables on disks (even casettes). These days we're a bit more sophisticated than that. Now there's usually a data file and an interpreter. The interpreter reads data files and provides the gaming interface. The data file is the actual game, and is often implemented by a scripting language. So for example, you you could have the two Scott Adams datafiles “The Count.dat” and “Voodoo Castle.dat”. To actually play the games, you'd invoke the scottfree interpreter with the name of the datafile you wish to play.

The first adventure game was Adventure (actually “ADVENT”, written on a PDP-1 in 1972). You can play adventure yourself (actually, a descendent); it comes with “bsd games” on most Linux distros.

They became popularized by Scott Adams, who is widely considered to be the father of text adventuring. You can play Scott Adams adventures using scottfree, the game file interpreter written by Alan Cox, and the old data files, which are now shareware and can be download from Scott Adams' website.

Text adventures climaxed in the 80's with Infocom. There are many Infocom interpreters available for Linux; the most popular one being frotz. You still need the data files, and these are all still owned and considered commercial property by Activision.

As computer graphics became easier and more powerful, text adventures gave rise to graphic adventures. The death of interactive fiction more or less coincided with the bankruptcy of Infocom.


2.7. First Person Shooter (aka FPS)

What light through yonder window breaks? It must be the flash of the double barreled shotgun! We have a long and twisted history with FPS games which started when id Games released the code for Doom. The code base has forked and merged numerous times. Other previously closed engines opened up, many engines are playable via emulators, many commercial FPS games were released for Linux and there are quite a number of FPS engines which started life as open source projects. Although you may not be able to play your favorite FPS under Linux (Half-Life plays great under winex!) Linux definitely has no deficiency here!

First person shooters are characterized by two things. First, you pretty much blow up everything you see. Second, the action takes place in first person. That is, look through the eyes of the character who's doing all the shooting. You may even see your hands or weapon at the bottom of the screen. Some are set in fantasy (Hexen), others are science fiction (Quake II), and some are set in the present day `real world' (Soldier Of Fortune).

Just like text adventures, FPS fit the engine/datafile format. The engine refers to the actual game itself (Doom, Quake, Heretic2) and plays out the maps and bad guys outlined by the datafile (doom2.wad, pak0.pak, etc). Many FPS games allow people to write their own non-commercial datafile. There are hundreds, even thousands of non-commercial Doom datafiles that you can download for free off the net. Often, companies discard their engines and put them into the open source community so we can hack and improve them. However, the original data files are kept proprietary. To this day, you still have to purchase doom.wad.


2.10. Role Playing Game (aka RPG)

Anyone who has played games like Dungeons & Dragons or Call of Cthulhu knows exactly what an RPG is. You play a character, sometimes more than one, characterized by traits (eg strength, dexterity), skills (eg explosives, basket weaving, mechanics) and properties (levels, cash). As you play, the character becomes more powerful and the game adjusts itself accordingly, so instead of fighting orcs, at high levels you start fighting black dragons. The rewards increase correspondingly. At low levels you might get some gold pieces as a reward for winning a battle. At high levels, you might get a magic sword or a kick-butt assault rifle.

RPG's generally have a quest with a well defined ending. In nethack you need to retrieve the amulet of Yendor for your god. In Ultima II, you destroy the evil sorceress Minax. At some point, your character becomes powerful enough that you can `go for it' and try to complete the quest.

The canonical RPG on Linux is Rogue (the ncurses library can be traced back to the screen handling routines that were written for Rogue!) and its infinite variants like Zangband and Nethack (which has infinite variants itself). Some of them are quite complicated and are great feats of programming. There seems to be a deficiency of commercial RPGs on Linux. If you don't count all the rogue variants, there also seems to deficiency of open source RPGs as well.

While the insanely popular Ultima series, written by Richard Garriot (aka Lord British) for Origin, was not the first RPG, it popularized and propelled the RPG genre into mainstream. Ultima I was released in 1987 and was the game that launched 9 (depending on how you want to count them) very popular sequels, finishing with Ultima IX: Ascension. You can play Ultima VII under Linux with Exult.


3. Libraries

We'll run through the different gaming libraries you'll see under Linux.


3.3. What is OpenGL?

OpenGL is a high level graphics programming API originally developed by SGI, and it became an industry standard for 2D and 3D graphics programming. It is defined and maintained by the Architectural Revision Board (ARB), an organization whose include SGI, IBM, DEC, and Microsoft. OpenGL provides a powerful, complete and generic feature set for 2D and 3D graphics operations.

There are 3 canonical parts to OpenGL:

OpenGL is not only an API, it's also an implementation, written by SGI. The implementation tries to use hardware acceleration for various graphics operations whenever available, which depends on what videocard you have in you computer. If hardware acceleration is not possible for a specific task, OpenGL falls back on software rendering. This means that when you get OpenGL from SGI, if you want any kind of hardware acceleration at all, it must be OpenGL written and compiled specifically for some graphics card. Otherwise, all you'll get is software rendering. The same thing is true for OpenGL clones, like Mesa.

OpenGL is the open source equivalent to Direct3D (a component of DirectX). The important difference being that since OpenGL is open (and DirectX is closed), games written in OpenGL are much easier to port to Linux while games written using DirectX at this point in time are impossible to port to Linux.


3.11. What is SVGAlib? Frame buffer? Console?

The console is the dark non-graphical screen you look at when your computer first boots up (and you don't have have xdm or gdm running). This is opposed to the X environment which has all sorts of GUI things like xterms. It's a common misconception that X means graphics and console means no graphics. There are certainly graphics on the console—we will discuss the two most common ways to achieve this.

SVGAlib is a graphics library that lets you draw graphics on the the console. There are many graphical applications and games that use SVGAlib like zgv (a console graphical image viewer), prboom and hhexen. I happen to be a fan of this library and of graphical console games in general; they are extremely fast, fullscreen and compelling. There are three downsides to SVGAlib. First, SVGAlib executables need to be run by root or be setuid root, however, the library releases root status immediately after the executable begins to run. Secondly, SVGAlib is video card dependent–if your video card isn't supported by SVGAlib, you're out of luck. Third, SVGAlib is Linux only. Games written in SVGAlib will only work on Linux.

Frame buffers are consoles implemented by a graphics mode rather than a BIOS text mode. Why would you want to simulate text mode from a graphical environment? This allows us to run graphical things in console, like allowing us to choose what font we want the console to display (which is normally determined by BIOS). Imagine having a console font of Comic Sans MS? There's a good Frame Buffer howto available from LDP.


3.13. What is DirectX?

DirectX is a bunch of multimedia (2d and 3d graphics, sound, animation) API's for Microsoft's Windows OS, first developed by MS in 1995. Direct3D is to MS Windows as SDL is to Linux, except that Direct3D proprietary, closed source, very high level and only meant to compile and be used under Windows under the x86 architecture, whereas SDL is open source, lower level and extremely portable to other platforms. As of February 2002, the most recent version of DirectX is 8.1. The component of DirectX which is responsible for 3D graphics is called Direct3D.

We mention it here because it is a competing technology to open technologies like SDL and OpenGL/OpenAL. Many games have, historically, been unportable to Linux because they have been written in Direct3D. However, recently there have been Direct3D ports to Linux like Loki Software's Heavy Gear II. Also, Direct3D is important to people who play Windows games under Linux via wine, winex or one of the virtual machines like vmware. In particular, the whole point of winex is to provide better support for Direct3D which isn't very developed under plain wine.

A company named realtechVR started an open source project called the "DirectX Port" <http://www.v3x.net/directx> which, like wine, provides a Direct3D emulation layer that implements Direct3D calls. The project was focused on the BeOS platform, but is now focused on MacOS and Linux. The DirectX Port is open source and you can get their latest cvs from their sourceforge page at http://sourceforge.net/projects/dxglwrap>.


4. Definitions: Video Card and 3D Terminology

We'll cover videocard and 3D graphics terminology. This stuff isn't crucial to actually getting a game working, but may help in deciding what hardware and software options are best for you.


5. XFree86 and You

If you're going to game under X, it's crucial that you know a bit about X. The "X Window User HOWTO", and especially "man XF86Config" are required reading. Don't short change yourself; read them. They have an extremely high "information to space" ratio. Many problems can be fixed easily if you know your way around XF86Config (or XF86Config-4).


5.1. Getting information about your X system


6. Various Topics


6.2. Milking performance from your system for all it's worth


6.3. About libraries on Linux

A common problem you'll see in gaming is a library file not being found. They're kind of mysterious and have funny names, so we'll go over libraries on Linux for a bit. There are two types of libraries, static and dynamic. When you compile a program, by default, gcc uses dynamic libraries, but you can make gcc use static libraries instead by using the -static switch. Unless you plan on compiling your games from source code, you'll mainly be interested in dynamic libraries.


7. When Bad Things Happen To Good People

Of course we can't cover every Bad Thing that happens, but I'll outline some items of common sense.

There are two types of bad things: random and repeatable. It's very difficult to diagnose or fix random problems that you don't have any control over when they happen or not. However, if the problem is repeatable "it happens when I press the left arrow key twice", then you're in business.


7.4. Google Group Search

Every post made to Usenet gets archived at Google's database at groups.google.com. This archive used to be at www.deja.com, but was bought by Google. Many people still know the archive as "deja".

It's almost certain that whatever problem you have with Linux, gaming related or not, has already been asked about and answered on Usenet. Not once, not twice, but many times over. If you don't understand the first response you see (or if it doesn't work), then try one of the other many replies. If the page is not in a language you can understand, there are many translation sites which will convert the text into whatever language you like, including www.freetranslation.com and translation.lycos.com. My web browser of choice, Opera (available at www.opera.com allows you to use the right mouse button to select a portion of text and left click the selection to translate it into another language. Very useful when a Google group search yields a page in German which looks useful and my girlfriend (who reads German well) isn't around.

The Google group search has a basic and advanced search page. Don't bother with the simple search. The advanced search is at groups.google.com/advanced_group_search

It's easy to use. For example, if my problem was that Quake III crashed everytime Lucy jumps, I would enter "linux quake3 crash lucy jumps" in the "Find messages with all of the words" textbox.

There are fields for which newsgroup you want to narrow your search to. Take the time to read and understand what each field means. I promise you. You won't be disappointed with this service. Use it, and you'll be a much happier person. Do note that they don't archive private newsgroups, like Loki Software's news server. However, so many people use Usenet, it almost doesn't matter.


7.5. Debugging: call traces and core files

This is generally not something you'll do for commercial games. For open source games, you can help the author by giving a corefile or stack trace. Very quickly, a core file (aka core dump) is a file that holds the "state" of the program at the moment it crashes. It holds valuable clues for the programmer to the nature of the crash -- what caused it and what the program was doing when it happened. If you want to learn more about core files, I have a great gdb tutorial at www.dirac.org/linux.

At the *very* least, the author will be interested in the call stack when the game crashed. Here is how you can get the call stack at barf-time:

Sometimes distros set up their OS so that core files (which are mainly useful to programmers) aren't generated. The first step is to make your system allow unlimited coresizes:

    ulimit -c unlimited
			

You will now have to recompile the program and pass the -g option to gcc (explaining this is beyond the scope of this document). Now, run the game and do whatever you did to crash the program and dump a core again. Run the debugger with the core file as the 2nd argument:

    $ gdb CoolGameExecutable core
			

And at the (gdb) prompt, type "backtrace". You'll see something like:

    #0 printf (format=0x80484a4 "z is %d.\n") at printf.c:30
    #1 0x8048431 in display (z=5) at try1.c:11
    #2 0x8048406 in main () at try1.c:6
			

It may be quite long, but use your mouse to cut and paste this information into a file. Email the author and tell him:

  1. The game's name

  2. Any error message that appears on the screen when the game crashes.

  3. What causes the crash and whether it's a repeatable crash or not.

  4. The call stack

If you have good bandwidth, ask the author if he would like the core file that his program dumped. If he says yes, then send it. Remember to ask first, because core files can get very, very big.


7.7. What to do when a file or library isn't being found (better living through strace)

Sometimes you'll see error messages that indicate a file wasn't found. The file could be a library:

    % ./exult 
    ./exult: error while loading shared libraries: libSDL-1.2.so.0: cannot load shared object
    file: No such file or directory
			

or it could be some kind of data file, like a wad or map file:

    % qf-client-sdl  
    IP address 192.168.0.2:27001 UDP Initialized Error: W_LoadWadFile: couldn't load gfx.wad
			

Suppose gfx.wad is already on my system, but couldn't be found because it isn't in the right directory. Then where IS the right directory? Wouldn't it be helpful to know where these programs looked for the missing files?

This is where strace shines. strace tells you what system calls are being made, with what arguments, and what their return values are. In my `Kernel Module Programming Guide' (due to be released to LDP soon), I outline everything you may want to know about strace. But here's a brief outline using the canonical example of what strace looks like. Give the command:

    strace -o ./LS_LOG /bin/ls
			

The -o option sends strace's output to a file; here, LS_LOG. The last argument to strace is the program we're inspecting, here, "ls". Look at the contents of LS_LOG. Pretty impressive, eh? Here is a typical line:

    open(".", O_RDONLY|O_NONBLOCK|0x18000)  = 4
			

We used the open() system call to open "." with various arguments, and "4" is the return value of the call. What does this have to do with files not being found?

Suppose I want to watch the StateOfMind demo because I can't ever seem to get enough of it. One day I try to run it and something bad happens:

    % ./mind.i86_linux.glibc2.1 
    Loading & massaging...
    Error:Can't open data file 'mind.dat'.
			

Let's use strace to find out where the program was looking for the data file.

    strace ./mind.i86_linux.glibc2.1 2> ./StateOfMind_LOG
			

Pulling out vim and searching for all occurances of "mind.dat", I find the following lines:

    open("/usr/share/mind.dat",O_RDONLY) = -1 ENOENT (No such file)
    write(2, "Error:", 6Error:)   = 6
    write(2, "Can\'t open data file \'mind.dat\'."..., ) = 33
			

It was looking for mind.dat in only one directory. Clearly, mind.dat isn't in /usr/share. Now we can try to locate mind.dat and move it into /usr/share, or better, create a symbolic link.

This method works for libraries too. Suppose the library libmp3.so.2 is in /usr/local/include but your new game "Kill-Metallica" can't find it. You can use strace to determine where Kill-Metallica was looking for the library and make a symlink of /usr/local/include/libmp3.so.2 to wherever Kill-Metallica was looking for the library file.

strace is a very powerful utility. When diagnosing why things aren't being found, it's your best ally, and is even faster than looking at source code. As a last note, you can't look up information in source code of commercial games from Lokisoft or Tribsoft. But you can still use strace with them!


7.8. Hosed consoles

Sometimes a game will exit abnormally and your console will get `hosed'. There are a few definitions of a hosed console. The text characters could look like gibberish. Your normally nice black screen could look like a quasi-graphics screen. When you press ENTER, a newline doesn't get echo'ed to the screen. Sometimes, certain keys of the keyboard won't respond. Logging out and back in won't work, but there are a few things that will:

Note that if you use a journalling filesystem like ext3, reiserfs or xfs, hitting the power switch isn't all that bad. You're still supposed to shutdown in an orderly fasion, but the filesystem integrity will be maintained. You won't see an fsck for the partitions that use the journalling filesystem.


8. Hardware

I'm no Tom's Hardware or Anandtech, and don't have access to all the wealth of hardware that's out there. Contributions and information to fill out this section would is welcome. This stuff changes very often, and peoples' experience with hardware would be useful.


8.1. Which video card is the best?

If you're using Linux, you must be smart enough to know that there isn't a plain answer to this question. There seem to be 3 choices for hardware accelerated 3D these days:

  1. 3dfx: Voodoo cards

  2. Nvidia: GeForce

  3. ATI: Radeon

According to Tom's Hardware and Anadtech, the Radeon is king when playing at very high resolution (as in 1600x1200), at 32bpp, in Windows. Otherwise the GeForce is king. There are two problems with this. We don't normally play at 1600x1200/32bb, and we don't play on Windows (at least I don't).

There aren't many recent video card benchmarks out for Linux. The most recent one I've seen is from March 2001 at www.linuxhardware.org/features/01/03/19/0357219.shtml. Considering the dearth of benchmarks out there, this needs to be taken as a canonical benchmark, so I simply quote their conclusion:

At this point the performance numbers tell a pretty simple story, if it's raw speed you are looking for, the GeForce 2 is your choice. There is very little performance drawback to running your favorite games in Linux instead of Windows with this card. It provides a truly impressive performace across the board. The Radeon's performance will almost definitely improve as the DRI drivers mature, but for now, especially for the impatient, it is simply not a good choice for the hard core 3d gamer.

If, however, you are a graphics designer, and want a card with impeccable 2d image quality, with 3d graphics only a secondary priority, the Radeon is your best bet. The DRI drivers, even in their current state, are quite usable. For 2d only users, XFree86 4.0.2 provides production quality 2d drivers. The GeForce thoroughly trounced the Radeon in the Xmark performance test, so if you aren't running at a ultra high resolution, or aren't that picky, the GeForce is once again a better pick.

Now for my own input. The Radeon is a pretty amazing card. It's what I use, and I have yet to see a game that needs more power than the Radeon is able to provide. However, the OpenGL renderer for the Radeon is buggy, although the only games I've seen that suffer greatly are Loki Software's Heavy Metal (which is, regrettably, unplayable) and Soldier Of Fortune. Hopefully the people doing Mesa for the Radeon will fix this very soon since the Radeon is the best option for people who don't want to rely on the closed source, proprietary GeForce.

Now about the Voodoo cards. Unfortunately, 3dfx was bought out by nVidia, so these cards are a dead end market. If you're out to play the bleeding edge games like Rune or Tribes2, you'll want the Voodoo 3, 4 or 5. Preferably the 4 or 5. I think the Voodoo 5 is basically a Voodoo 4 with a second processer. However, this processor is not utilized by the Linux driver, and rumor says that the Linux 3dfx driver will never support it. So as far as Linux is concerned, the Voodoo 4 and 5 are the same card. All the drivers, Glide2 library and OpenGL renderers for the Voodoo cards were open sourced by 3dfx before they when under. It is an embarrasment to the Linux and open source community in general that this company failed.


8.2. Which sound card is best?

Now that Linux is beginning to mature, this question isn't as important as it used to be. Once upon a time, soundcards without onboard MIDI chips (most PCI sound cards) didn't do MIDI. This was mostly a problem for things like xdoom or lxdoom using musserv. These days we have MIDI emulators like Timidity and libraries like SDL which don't require hardware MIDI support. Frankly, I've had many cards and I can't tell the difference between any of them for gaming. If you want to do things like convert a record LP to digital format, then your choice of a soundcard with a professional grade A/D converter is absolutely crucial. For this HOWTO, we'll assume that you're more of a gamer than a studio recording engineer.

Your decision should be based on what will be the easiest to configure. If you already have a card and it works well, that's good enough. If you're in the market to buy a sound card, get something that will take you a second to configure. PCI cards are much easier to deal with than ISA since you don't need to tell their drivers about which system resources (IRQ, DMA, I/O addresses) to use. Some ISA cards ARE plug-n-play, like the Creative AWE-64, and the Linux kernel has come a long way in auto configuring them.

My personal recommendation is any card which has the es1370 or es1371 chip, which uses the es1370 and es1371 sound drivers on Linux. These cards include the older Ensoniq es1370 and newer Creative PCI-128. These cards are extremely cheap and trivial to get working under Linux.

I used to be quite a big fan of the Creative Soundblaster AWE 32, AWE 64 and AWE 64 gold soundcards. They are ISA, but are plug-n-play. A couple of issues to note. First, the Creative AWE HOWTO is very out of date. Second, AFAIK, Creative never released a Linux driver that uses the AWE 64's extra 32 voices (and they never released programming information for it either). So to a Linux users, the AWE 64 and 32 are nearly identical sound cards. If anyone has more information about the differences that a Linux user would see between the AWE 64 and 32, I'd like to hear from you.

The Creative Soundblaster Live! is an extremely popular PCI sound card these days. I've never owned one, so I cannot comment here. However, there have been numerous reports about serious problems with the Live! and AMD motherboards that use the 686b southbridge. A google search should turn up alot of information on this problem.

A more relevent issue is speakers, but even here the difference isn't huge. I've had expensive Altec Lansing speakers perform only slightly better than el-cheapo speakers. You get what you pay for with speakers, but don't expect a huge difference. You'll want to get something with a separate sub-woofer; this does make a difference at a cost of extra power and connector wires.


9. Miscellaneous Problems

9.1. Hardware Acceleration Problems

XFree86 4.0 provides a more centralized and self-contained approach to video. Much of the funkyness like kernel modules for non-root access of video boards is, thankfully, gone.


9.1.1. Hardware acceleration isn't working at all

If you're getting like 1 fps, then your system isn't using hardware 3D acceleration. There's one of two things that can be going on.

  1. Your 3D system is misconfigured (more likely)

  2. Game X is misconfigured (less likely)

The first step is to figure out which one is happening.

  1. If you have X 4.0 (X 3.* users procede to step 2), look at the the output of X -probeonly. You'll see:

     (II) XXXXXX: direct rendering enabled 

    or

     (II) XXXXXX: direct rendering disabled 

    Where XXXXXXX depends on which video card you have. If direct rendering is disabled, then your X configuration is definitely faulty. Your game is not at fault. You need to figure out why DRI is disabled. The most important tool for you to use at this point is the `DRI Users Guide'. It is an excellently written document that gives you step by step information on how to get DRI set up correctly on your machine. A copy is kept at www.xfree86.org/4.0/DRI.html.

    Note that if you pass this test, your system is CAPABLE of direct rendering. Your libraries can still be wrong. So procede to step 2.

  2. There is a program called gears which comes with the "mesademos" package. You can get mesademos with Debian ( apt-get install mesademos) or you can hunt for the rpm on rpmfind.net. You can also download and compile the source yourself from the mesa homepage.

    Running gears will show some gears turning. The xterm from which you run gears will read "X frames in Y seconds = X/Y FPS". You can compare your system to the list of benchmarks below.

          CPU TYPE     VIDEO CARD     X VERSION    AVERAGE FPS
    			

    Compiling Mesa and DRI modules yourself can increase your FPS by 15 FPS; quite a performance boost! So if your number is, say, about 20 FPS slower than a comparable machine, chances are that gears is falling back on software rendering. In other words, your graphics card isn't 3D accelerating graphics.

    More important than FPS is having a constant FPS for small and large windows. If hardware acceleration is working, the FPS for gears should be nearly independent of window size. If it's not, then you're not getting hardware acceleration.


9.3. Why isn't my sound working?

First of all, it's probably not the game, it's probably your setup. AFAIK, there are 3 options to getting a sound card configured under Linux: the free OSS sound drivers that come with the Linux kernel, the Alsa drivers and the commercial OSS sound drivers. Personally, I prefer the free OSS drivers, but many people swear by Alsa. The commercial OSS drivers are good when you're having trouble getting your sound card to work by free methods. Don't discount them; they're very cheap (like 10 or 20 bucks), support bleeding edge sound cards and take a lot of guesswork out of the configuring process.

There are 4 things that can go wrong with your sound system:

  1. Shared interrupt

  2. Misconfigured driver

  3. Something's already accessing the sound card

  4. You're using the wrong driver


9.3.1. Shared interrupt

The first thing to do is to figure out if you have an IRQ conflict. ISA cards can't share interrupts. PCI cards can share interrupts, but certain types of high bandwidth cards simply don't like to share, including network and sound cards. To find out whether you have a conflict, do a "cat /proc/interrupts". Output on my system is:

    # cat /proc/interrupts
               CPU0       CPU1
      0:   24185341          0          XT-PIC  timer
      1:     224714          0          XT-PIC  keyboard
      2:          0          0          XT-PIC  cascade
      5:    2478476          0          XT-PIC  soundblaster
      5:     325924          0          XT-PIC  eth0
     11:     131326          0          XT-PIC  aic7xxx
     12:    2457456          0          XT-PIC  PS/2 Mouse
     14:     556955          0          XT-PIC  ide0
    NMI:          0          0
    LOC:   24186046   24186026
    ERR:       1353
		

The second column is there because I have 2 CPU's in this machine; if you have one CPU (called UP, or uniprocessor), you'll have only 1 CPU column. The numbers on the left are the assigned IRQ's and the strings to the right indicate what device was assigned that IRQ. You can see I have an IRQ conflict between the soundcard (soundblaster) and the network card (eth0). They both share IRQ 5. Actually, I cooked this example up because I wanted to show you what an IRQ conflict looks like. But if I did have this conflict, neither my network nor my sound would work well (or at all!).

If my sound card is PCI, the preferred way of fixing this would be to simply move one of the cards to a different slot and hope the BIOS sorts things out. A more advanced way of fixing this would be to go into BIOS and assign IRQ's to specific slots. Modern BIOS'es can do this.


10. Emulation and Virtual Machines

Linux gets ragged on alot because we don't have the wealth of games that other platforms have. Frankly, there's enough games for me, although it would be really nice to have some of the bleeding edge games and classics like Half-life and Carmageddon. Fortunately, we have more emulators than you can shake a stick at. Although playing an emulated game is not quite as fun as playing it on the native machine, and getting some of the emulators to work well can be a difficult task, they're here, and there's alot of them!


10.4. Win32


11. Interpreters

11.1. SCUMM Engine (LucasArts)

Lucasarts wrote an engine for point and click adventures named SCUMM (Script Creation Utility for Maniac Mansion). They wrote many graphical adventures using SCUMM, like their famous Monkey Island series (all three). Ludvig Strigeus was able to reverse engineer the SCUMM format and write an interpreter for SCUMM based games that compiles under Linux and Win32 named scummvm <http://scummvm.sourceforge.net/>. Their website is very good, and chock full of any kind of information about SCUMM and playing these games under scummvm.

A compatibility page is maintained at the scummvm website. FWIW, I've been able to finish many of the games that are listed as 90% done with no problems. scummvm is rock solid, and allows you to purchase SCUMM based Lucas Arts games, copy the data files to your hard drive and play them under Linux. As of February 2002, I've been following their cvs, and this project is undergoing constant development. Kudos to the scummvm team.


12. Websites


12.2. Commercial Linux Game Websites


12.2.2. Who Used To Release Games For Linux

Loki Software: www.lokigames.com

As the company that brought CTP and Quake3 to Linux, Loki was the father of Linux gaming. They were one of the first and had, by far, the most titles (I own ALL of them). Loki ported games to Linux, mostly using the SDL library. Loki's death in January 2002 was the biggest setback Linux has ever had in its attempt to capture the general desktop market. Linuxgames.com has a nice Loki timeline at http://www.linuxgames.com/articles/lokitimeline/

Tribsoft: www.tribsoft.com

Tribsoft released Jagged Alliance 2, an excellent rpg/strat which claimed 2+ weeks of my life. There were slated to release Europai Universalis, Majesty and Unfinished Business. However, as of 3Jan01, Mathieu Pinard of Tribsoft said that he was taking a break and Tribsoft would no longer release games for awhile. He'll still support JA2 but don't expect patches or updates.

MP Entertainment: www.hopkinsfbi.com

MP Entertainment released Hopkins FBI, my favorite game ever released for Linux. More violent than Quake. More nudity than Hustler. More camp than Liberacce. It's a comic book on your monitor. They were slated to release Hopkins FBI II and a few other titles, but it's been a few years since the announcements with no sign that the games are coming. They've ignored all my attempts at finding out more information, so I have to conclude that MP Entertainment is in the same status as Tribsoft. You can still purchase or download a demo of Hopkins FBI from their website. If anyone has more information on this company or the author of Hopkins, please contact me.

Phantom EFX: www.phantomefx.com

They offer Reel Deal Slots, which is very nicely done! I'm not much for poker/card/gambling games, but this game is impressive. They have other releases, but have since dropped Linux from their list of OS's to publish games for.