Linux gaming

Posts you want to find years later go here.
Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Linux gaming

Post by Jonathan »

I've been a dual booter for years because I like Linux but want to play computer games. Recently, I determined that I want to eliminate the Microsoft partition. Let's have a look at the current state of Linux gaming. This article will be more of a review than a HOWTO, though I will link to HOWTOs when appropriate. The first part deals with setup and configuration. The second part experiments with free software games. The third examines non-free games with native Linux support, like Doom 3 and Unreal Tournament 2004. In the fourth part I will try running non-native Linux games through whatever means are available.

Configuring Linux For Gaming

Choose your hardware carefully. I decided right away that I wanted to use NVidia as my 3D graphic card vendor. ATI really pushed their Linux driver support last year, but a quick look at the official errata made me jump over to NVidia. There's decent support for all the builtins on my Asus P4P800 motherboard. I specifically bought a wireless card known to work under Linux, using the lists I found. This was not difficult, although cross-checking all the available info made it time-consuming. I wish more vendors would advertise Linux support.

The Linux distribution you choose matters. I wanted a Debian-based system with a GNOME desktop and the 2.6 Linux kernel. I could not get Knoppix or Xandros to install, so my third choice was UserLinux, a Debian sarge derivative. I can't really recommend it. You want a distro that has a good installer and decent hardware autodetection unlike UserLinux. If you pay for a commercial distro, you may also get Cedega support for running Windows games under Linux.

Debian sarge does not have X.org but uses XFree86 instead. Right now, this is not a problem because they're nearly the same code, but all the significant development is happening on X.org, not XFree86. I foresee yet another OS installation in my future, after the nifty new features they're working on in X.org are ready.

Debian sarge did not have prepackaged NVidia drivers for the 2.6 kernel, only the 2.4 kernel. I had to build a new custom kernel. Once I did that, though, I am pleased to report that NVidia's installer worked quite well. After installing these, I had an X server with an NVidia splash screen. This is slightly irritating; NVidia doesn't plaster their logo all over my Windows box.

Most distros will have the NVidia drivers prepackaged so users don't have to compile custom kernels. A good gaming distro would have the NVidia drivers on the installation media for autodetection of recent NVidia hardware.

Debian-installer didn't detect my motherboard's integrated sound. A lot of fiddly effort on my part went into getting the integrated sound working. There's a wiki which I followed; you can read the results of my exploits on this debian-user thread. After asking for help, I updated my alsa tools several more times and discovered my sound had decided to start working. I still don't have any particular insight into what was wrong, although I at least have a working system as an example now.
Last edited by Jonathan on Tue Apr 05, 2005 8:20 pm, edited 4 times in total.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

free software games

Post by Jonathan »

Free Software Games

Debian sarge comes with a large selection of what I consider classic Unix-style games: great time-wasters like koules, GFingerPoken, and Troubles of Middle Earth. I also tried a few titles with more demanding requirements.

Celestia - More properly a toy, not a game, Celestia is hardware accelerated with texture maps. I found Celestia to be quite smooth. It worked exactly like the Win32 Celestia does.

Battle of Survival - Based on the Stratagus engine, BOS is a 2D RTS that draws upon elements of the Warcrafts, Starcraft, and Command and Conquer. The Warcraft 2 clone FreeCraft is no longer developed because of Blizzard. There was no installation or configuration to speak of for Stratagus. The sound and art for BOS is high quality, like Counterstrike's.

Stratagus's roots as a Warcraft 2 engine show through, unfortunately. The ranged grunt has issues with passiveness and ally blocking, so your grunts won't all engage at once. The tech tree is not very developed, either. BOS is still a work in progress, though, so hopefully they will fix these issues.

FreeCraft, though no longer developed, is a complete replacement for WarCraft 2. It is completely playable. Freecraft's sound and art are amateur, but not annoying.

TuxRacer - a 3D action game with sound. Worked right the first time. I haven't tried anything that required a different sound daemon or mucking with my settings.

TuxRacer and FreeCraft entered fullscreen mode on startup. I had to set BOS to fullscreen mode in its options menu. When I received IMs (via GAIM), the fullscreen game was switched to windowed mode automatically. I had a bit of trouble moving the mouse focus to the IM window, but I could type and ALT+TAB just fine.

Free games that are packaged for Debian seem to work just as well as Windows games do on Windows.
Last edited by Jonathan on Thu Mar 24, 2005 10:30 pm, edited 2 times in total.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Non-Free Software Games

Doom 3 - Id doesn't provide an installer. The installation instructions list which files need to be copied from the CD. The patched binary can be downloaded from id's website.

Unreal Tournament 2004 - The Linux binaries and installer come on the CD. The installer is graphical -- I think it's Python. Once installed, I patched it up using the patch from icculus.org.

Trying to run these games exposed a problem with my NVidia driver installation. Hard to say whether it was NVidia's fault or Debian's. Debian may do the correct setup automatically if you install the Debian NVidia drivers. I googled a quick fix and was off and running after that. Both D3 and UT use native ALSA for sound. I was surprised that both worked without an issue under Debian. I was expecting them to only work with the Linux Standard Base or certain distros.

Myth 2: Soulblighter - Myth is the only Loki-ported game I wanted to try. I found a copy on Amazon; you can also check eBay. The version on the CD segfaults on a modern Linux distribution. I followed the workaround instructions people have posted and can play the game (on my glibc 2.2 distribution) without cutscenes using the latest 1.3e patch from Loki. The game's OpenGL support does not recognize the NVidia GL libraries, however, so I am limited to software rendering. Project Magma is working on porting their community-produced 1.5 patch to Linux. When that happens, Myth 2 Linux players should finally get OpenGL support on modern video cards.

Neverwinter Nights - There is no installer for NWN, nor can you just copy the files off the CDs. Instead, you are supposed to download a 1.2 GB tar.gz file from one of the three mirrors that is hosting the file. Firefox crapped out at 800 MB, so I had to use `wget -c` to grab the rest of the game resources. Then you must download the Linux binaries and the latest patch update from bioware.com, also in tar.gz format. Once I had done all that, I could not start nwn from the supplied shell script. I found that it was missing libmss.5.6. Searching for this file revealed that it was in the nwn/miles/ directory under libmss.5.6.1.2, so I symlinked libmss.5.6 to libmss.5.6.1.2. After that I was able to play the game without any issues. Performance with my GeForce 6800 is good.

Dofus - This game is written in Flash. It works just fine under Linux. I did once have an issue with the game window not resizing correctly when I adjusted the size of my browser window, but I haven't been able to reproduce that bug.

The Linux version of each game is the complete version. The newer titles work perfectly. The older Myth 2 is playable, but has many issues. Contrast this with Windows 3.1 games like Stars! that are still playable on Windows XP.
Last edited by Jonathan on Mon Feb 13, 2006 11:59 pm, edited 13 times in total.

Martin
Chump
Posts: 124
Joined: Fri Jul 18, 2003 12:30 am
Location: Los Gatos, CA
Contact:

Re: free software games

Post by Martin »

Dwindlehop wrote:Free Software Games

Debian sarge comes with a large selection of what I consider classic Unix-style games: great time-wasters like ... GFingerPoken ...
I can't believe people still package that game. I never really finished it.

Which reminds me that I've been sitting on an unfinished game for a few years now, kind of a neat one. I should probably push it out the door in the next couple of months before I start work. It needs a few fixes though, and I should probably update it to use GTK 2.x. I should probably just rewrite the whole thing, or at least some of it. Maybe I'll make it a higher priority.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Well, they don't package it, not really. But hey, it's there, complete with five year old bugs.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Windows Games under Linux

The two best options for running Windows games under Linux are Wine and Cedega, formerly known as WineX. I tried using the instructions from linux-gamers.net to install Cedega from source. Cedega is available in binary form from TransGaming for $5 per month, which is an unnecessary tax on Linux gamers. Other people feel even more strongly: http://timedoctor.org/boycott_winex.php.

Wine is part of Debian testing, but unfortunately it is an old release. The latest release is available from Ubuntu or Wine.

Steam - There is a separate HOWTO to get Steam working using Cedega CVS. Alternatively, I could use Wine. In the end, I couldn't get either working from CVS. I had to use prepackaged debs. The Cedega deb worked perfectly. I also had to grab the Mozilla ActiveX control in order to Browse Games and see News.

Half Life - I was able to jump in the training session with no problems. Sound worked correctly the first time.

Counter Strike - I can host my own game with no problem. This morning I couldn't connect to the master server to get the server list, so I don't know if I can join other games yet. After deleting clientregistry.blob and letting Steam update itself again, I can connect!

Natural Selection - I followed the instructions on their website for installation. I had a slight problem. The installer kept trying to drop files in directories that did not exist, so I had to create them manually. That was annoying. After I did that, though, I was able to connect and play a quick game or two.

Stars! - I tried it briefly after following the Steam instructions for CVS Cedega, and it worked just fine, unlike Steam. I'm sure that CVS Wine or a Wine deb would be able to handle Stars!, a Windows 3.1 game, as well. Of particular note is that I did not have any font troubles like I remember Martin having a half dozen years ago when he tried to play Stars! using Wine. I did have to change my desktop resolution to 1280x1024 from 1280x960 in order to view the entire game.

Eve Online - This is the first real MMORPG I've tried to play under Linux. There's no Linux client, so I went with Cedega. Apparently, the Minmater empire gates cause the game to crash, so I won't be flying there. Also, the ESC key causes the game to crash. Apparently the game calls a DirectX rendering method without checking to see if it is supported. There's a fix for this in wine, so perhaps it will eventually work in Cedega. However, these are minor issues that don't prevent me from playing the game.

Update: as of Cedega 5.1.1, Eve's Minmater gates and the ESC key menu work properly. I had a little trouble changing Cedega to use the new engine, but once I understood the way Cedega is supposed to work there were no problems.

Update2: as of 2008, Cedega is just not a good alternative to Wine for Eve. Wine support for Eve has been awesome. I cannot say the same for Cedega, so it is late 2009 and I haven't paid for Cedega in over a year.

Weirdly, I could not get this game to install at first. The installation would try to extract all the files in the executable and fail at resSND.stuff. I kept getting an error "Extract: failed to write file resSND.stuff". It seemed like the setup executable was corrupted or the disk was full, but neither of these items was the problem. Eventually I had to perform the Eve installation with Wine and then move the installed files over to my Cedega C: drive.
Last edited by Jonathan on Thu Jun 01, 2006 6:01 pm, edited 7 times in total.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Conclusions

I don't think Debian sarge is a good distribution for x86 Linux gaming. There are an ever-increasing number of distributions based on Debian, though: Gnoppix, Ubuntu, Xandros, and Linspire are some of the highest profile ones. You probably should try one of those unless you like configuring your system manually.

I am very disappointed that Myth 2, a game originally released in 1999, does not work correctly on glibc 2.2 distributions. It doesn't work at all on glibc 2.3 distributions, apparently. Luckily for Myth fans, Bungie released the source to the community so support could continue. I believe there will eventually be a new patch for Myth 2 Linux. However, most games aren't so fortunate as to have a community armed with source. Developers of libraries like SDL and glibc really need to consider whether the improvements they make are so important that they have to break backwards compatibility. Microsoft, at least, has a good track record at keeping consumer-level applications running on OSes released years afterward.

Overall, I am impressed and encouraged. The free software games packaged for Debian all work flawlessly. The major non-free titles also worked under Linux without a problem. I have confidence that id and Epic will continue to support Linux and provide game engines to the rest of the industry. Game selection is a bit limited, especially in the MMORPG category, but that doesn't bother me much.

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post by Peijen »

Have you tried Never Winter Nights? I know Gentoo has the client in their port tree, I am not sure if Debian has it in their package system.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

I intend to try Neverwinter Nights. I've been busy playing a lot of UT2004 Onslaught, so I haven't had a chance yet. I also intend to try Steam, then Counterstrike, and finally Natural Selection.

As I try new games I'll edit the appropriate sections. I'll bump the thread if there's something especially interesting.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

I understand why Cedega works much better than Wine now. It has nothing to do with being gratis or not. Cedega works because it isn't libre. TransGaming licenses gobs of code from Microsoft and other companies. Their binary product distributes this licensed software along with the LGPLed, AFPLed, and ReWind licensed code they reuse from Wine and ReWind.

TransGaming's public CVS server contains all of the free source code they are required to distribute with their software, and none of the licensed code they are barred from distributing. Their public CVS server is also not their development server. When they make a release, they merge code into the public server.

For these reasons, Cedega from CVS is no more or less functional than ReWind+Wine. TransGaming's binary product, however, leverages all that non-free code to create a pretty usable platform for Windows games.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Debian does not have a Neverwinter Nights package. In fact, I'm not altogether certain why Gentoo is able to distribute the binaries or whatever it is they are distributing. You must register with bioware.com to download the Linux binaries.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Debian sarge has finally been released. Just to clarify, Ubuntu and most other Debian derivatives are based on sid, not sarge. Sid uses newer packages.

I was able to resolve what I thought was a corrupt NWN save file by updating my graphics card drivers. This annoyance is pretty much the same BS any PC gamer has to deal with.

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post by Peijen »

Dwindlehop wrote:This annoyance is pretty much the same BS any PC gamer has to deal with.
Ha, so the 'You will crash every 5 minutes too if you have to support this many hardware' is true!

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

To a certain extent, yes, it is true. I never crashed X while playing games, though. Nor have I locked up my box. I certainly have never caused a kernel panic under Linux.

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post by Peijen »

Dwindlehop wrote:To a certain extent, yes, it is true. I never crashed X while playing games, though. Nor have I locked up my box. I certainly have never caused a kernel panic under Linux.
That's because Linux is better designed. Linux kernel is a few generation newer than Dos and maybe Windows. I am sure if you take Unix from the 1980s, put it on a x86 pc and play games with it you get as much crash as Dos. I have only experience few crashes on XP that brings down the system.

However I agree, Microsoft needs to get away from developing their shit so tightly coupled. An error with sound device should not cause kernal panic, I could live without sound until I get it replace.

When is hardware virtualization going to be here? I want to run 50 versions of Windows/Linux/OS X, one for each game I am playing.

As far as gaming on Linux goes, I think people need to develop a common gaming API like Microsoft did with DirectX. I remember when DX 3 came out, everyone make fun of Microsoft, but after a decade it the most used gaming API, and a lot of people stay with windows so they can play games.

Actually Linux needs alot of standardized APIs, but I have been saying that forever.

Martin
Chump
Posts: 124
Joined: Fri Jul 18, 2003 12:30 am
Location: Los Gatos, CA
Contact:

Post by Martin »

Dwindlehop wrote:To a certain extent, yes, it is true. I never crashed X while playing games, though. Nor have I locked up my box. I certainly have never caused a kernel panic under Linux.
Just playing video causes the graphics card on my machine to freeze up regularly on this new machine I got and rarely on my laptop. The cure is either to have another box you can use to SSH in, or actually switch vconsoles, log in as root, and shut down blindly. (I've actually gotten pretty good at this.) The video driver situation under Linux is much worse than that under Windows. Also, sometimes after extended use, my laptop refuses to wake up from sleep mode (I guess it goes comatose).

I think I caused a panic once but I can't remember the circumstances.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

My understanding is that power management and laptop support for Linux, while they do exist, are fairly dismal. Definitely an area in need of improvement.

I have no trouble playing video on my system. I have installed Real and that works fine. I can play DivX, MPEG, and WMV with the default setup of Totem and/or VLC with no issues. WMV 9 isn't supported yet, but I understand DVD Jon has a proof of concept out already.

I have locked up Linux boxes and Solaris boxes, but only while coding or using workstation apps. Also, a few times I've encountered hardware failures while using Linux. Linux gaming has been smooth, functionally, except where noted above.

SDL (Simple DirectMedia Layer) - A cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device.

Essentially all Linux games use the SDL. I'll poke around and see if any do not.
Last edited by Jonathan on Tue Jun 07, 2005 9:17 pm, edited 1 time in total.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Intel's hardware virtualization will debut before the end of the year.

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post by Peijen »

Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
Much better than last time I checked (was video + audio about a year ago). Now it need 1 million R&D budget, and easy porting from directX games.

quantus
Tenth Dan Procrastinator
Posts: 4891
Joined: Fri Jul 18, 2003 3:09 am
Location: San Jose, CA

Post by quantus »

Peijen wrote:I have only experience few crashes on XP that brings down the system.
Typically, XP will crash because of a poorly written driver or because of XP's error reporting code. Actually, I'd bet the driver crashes are really caused by the error reporting code trying to capture what's going on. I've read about it causing people's systems to crash every time the suspend or shut down too. Anyways, the code is complete crap.
Have you clicked today? Check status, then: People, Jobs or Roads

Post Reply