Friday, February 19, 2010

Gaming in Linux

Today I want to introduce you to a handful of products that make gaming on Linux possible. While there are plenty of great games new and old for Linux like Nethack and Yo Frankie, one of the biggest concerns I had when I made the jump from Windows XP to Ubuntu was my ability to play my rather extensive collect of PC games on the new operating system. To accommodate the switch, I set my system to dual boot to WinXP and Ubuntu, assuming I would just boot to WinXP if I wanted to play one of my games. To my surprise, I went almost 4 months without booting to Windows. With enough tinkering and the right programs, almost every game I wanted to play could be run in Ubuntu. In the end, the one game that drove me to Windows was La Mulana, an old school Metroid-like platformer originally written in Japanese, but translated, made with MSX-style graphics. Until I ran into problems with La Mulana, this was all made possible by two programs, Wine and DOSBox.

As Wikipedia will tell you about Wine, “Wine is an alcoholic beverage typically made of fermented grape juice.” Which my enhance your gaming experience, but will be until to assist in running much of anything when applied to a computer. Navigating around a few pages, Wikipedia admits that “Wine is [also] a free software application that aims to allow Unix-like computer operating systems to execute programs written for Microsoft Windows.” The term “aims” doesn't really do justice to the broad range of applications that the Wine developers and users have managed to get running. The list of compatible titles is conveniently listed on the project's website as the Wine AppDB. Not every title works flawlessly and not every title works without tweaks. At the moment, I am still struggling with a couple games to get past the main menu, but by and large all of my Windows games work well enough to play. But, you say, Mr. Niche Tech Guy, since Wine is emulating Windows, there must be some serious slowdown from all that overhead, right? Well, as its name would imply, Wine Is Not an Emulator, to the best of my understanding, Wine only translates the Windows function calls into something Linux can understand. For example, all the Directx calls are translated into OpenGL calls. This means that all the heavy processing operations are still happening on the processor and not in some abstraction, allowing applications to run with minimal overhead consumed by Wine.

But, you might ask, what about my DOS games? Some of those really rocked back in the day! Well, Wine only handles Windows applications, so for DOS games I used the above mentioned DOSBox. Going back to Wikipedia, “DOSBox is an emulator which emulates an IBM PC compatible computer running MS-DOS.” Which is a polite way of saying that DOSBox allows you to have a virtual DOS machine that kicks the pants off of any machine you might have had when DOS was in, and you never have to worry about messing with EMM386 and HIMEM.sys to get games to run. From my observations, DOSBox uses a lot more overhead than Wine, but if you are running a DOS era game on a modern PC, the game isn't likely to weighed down by overhead. In my experience, DOSBox is a lot more reliable than Wine when it comes to games, I've managed to get ever game I've tried to run working on DOSBox with minimal tweaking. But, I'm sure this has more to do with the relative complexities of the operating systems than the skill of the developers. While I've never needed to refer to it, the DOSBox project also maintains a database of compatible application.

There are two more applications that I wanted to mention for the place in Linux and old school gaming, Mono and ScummVM.

Plumbing Wikipedia once again, “Mono is a free and open source project led by Novell (formerly by Ximian) to create an Ecma standard compliant, .NET-compatible set of tools, including among others a C# compiler and a Common Language Runtime.” Which, besides being a mouthful, is the reason why people make fun of Wikipedia. In simple terms, Mono allows .NET applications to run on non-Windows machines. .NET is a set of programming languages that meet a specification set up by Microsoft. I haven't had a lot of experience running games under Mono, but from my experience, Mono does allow applications to run smoother and with less hiccups than Wine does, when the application is compatible. To the best of my knowledge there isn't an application database for programs compatible with Mono, and Mono has a number of “pieces” than can be optionally installed. In practice, I tend to only use Mono when I can't get a program running in Wine.

And, heading to the well one last time, Wikipedia reports that “ScummVM is a collection of game engine recreations.” Short and sweet this time, basically ScummVM allows you to older adventure games on a modern systems. I tried this on Windows a few years ago and it worked perfectly. The only drawback to this software is that it has a fairly limited selection of titles supported at least compared to Wine and DOSBox.

Well, those are the applications I keep handy for gaming in Linux. If I've missed any obvious application let me know.

No comments:

Post a Comment