Tuesday, March 23, 2010

Linux as a Gaming Platform

This past week, I've gotten more and more Windows-native games (as well as *nix ports) to run on my Arch x86_64 box. I originally built the computer with gaming in mind, but with Windows 7 getting worse and worse by the minute, booting into Windows just to play a game was becoming a more and more laborious task, not to mention that dirty feeling you get when you boot a computer and the Windows logo pops up.

I had originally used the latest stable version of Wine (1.0.1) obtained from Arch's User Repository, but found it was just as buggy as my previous Wine experiences. I managed to get Halo to run as mentioned in a previous post, however there were still relatively minor issues that persisted, such as the odd screen flicker, graphical problems on screen panning, and an odd box of discoloration that appeared in the top-right corner of the screen.

On a whim I decided to upgrade to the latest developmental version of wine (1.4.1), which was also in the AUR, though the PKGBUILD required some minor editing as wget was met with a 404 error trying to download the necessary files from the link given in the PKGBUILD. Luckily a fellow Archer posted a revised PKGBUILD in the comments, and it worked like a charm. Once the new Wine was up and running, I double-checked Halo to make sure the upgrade didn't brick it... Far from, it increased performance ten-fold, which is hard for me to say because it really wasn't bad at all to begin with. Suffice to say an immediate performance increase was more than noticeable.

After perusing the Wine AppDB for games I owned that were known to work well with Wine, I decided I'd give Half-Life 2 and Counter-Strike: Source a go. I encountered, and eventually fixed the same problem in both games. They would both load, but neither rendered any sound. After a quick trip through 'winecfg' I set the sound to OSS instead of ALSA, and it now works wonderfully. Not quite sure why, since ALSA is recommended explicitly over OSS for Wine, but with ALSA I can only play Halo, and with OSS all three games work. I suspect it has something to do with Steam, but I'll leave well-enough alone for now.

Now for the less-troublesome ports. There are countless remakes of the original DOS doom, most adding additional functionalities such as the ability to jump/crouch or have crosshairs, et cetera. Chocolate-Doom (AUR, detecting a trend here?) is a play on 'Vanilla Doom', as in the untouched original DOS version. It is as close to the original as possible, and preserves only original functionalities, as well as the original bugs. Using chocolate-doom I was able to play Doom 1, Doom 2, TNT, and Plutonia, just by setting the -iwad option on the command line and the path to the wad. Now I bought the id Super Pack on Steam some time ago, so I have access to the WADS on my Windows partition. Of course starting the game via a rather long terminal command isn't exactly efficient, so I wound up toying around with my ~/.bashrc file and got a rather satisfactory result.

~/.bashrc is used to create 'Aliases' for commands entered into the shell, using a very simple configuration file. Here's the portion of my ~/.bashrc pertaining to chocolate-doom:

alias chocolate-doom1="chocolate-doom -iwad ~/Data/DOOM.WAD"
alias chocolate-doom2="chocolate-doom -iwad ~/Data/DOOM2.WAD"
alias chocolate-doom-plutonia="chocolate-doom -iwad ~/Data/PLUTONIA.WAD"
alias chocolate-doom-tnt="chocolate-doom -iwad ~/Data/TNT.WAD"

Now instead of using the -iwad argument and specifying the full file path, I can just append a bit to the end of the command, so 'chocolate-doom1' will launch chocolate-doom using the DOOM.WAD. Much more efficient.

Getting away from the first person shooter category for a bit, Astromenace(AUR) is an extremely addictive space-scrolling 3D spaceship shooter, that is open-source. It also features RPG elements, as you buy a spaceship (from a rather large selection), and set about custom-configuring it with various hardware components such as shields, power-sources, engines, and of course weaponry. You earn money at the end of each level, which you can spend on these things as well as hull-upgrades. The difficulty level is also very customizable, you aren't presented with a simple easy/medium/hard menu, you actually get to specify various game mechanics such as damage bonuses, armor bonuses, and the like. You can also speed up/slow down the game in play using the F5-F7 keys. It is extremely addictive, and took up a few days of my life, but it is by far the best native Linux game of its kind I have ever seen.

My only hesitation about Linux originally was having to sacrifice quality gaming time to gain all of Linux's other benefits, but thanks to an increase in the availability of native/ported games for Linux, and the truly fantastic work Wine's developers are doing, I may eventually be able to rid my HDD of that ugly NTFS partition for good.

No comments:

Post a Comment