Over the past week, I’ve been wrestling with a few computers in an attempt to prove Linux is perfectly capable, with the help of WINE, of maintaining the flow of internet crack into your intravenous drips. A number of people I’ve spoken with regarding their being fed up with Windows, have said unequivocally that “if Linux could play games, I’d switch in a second”.
This misconception that people have is disconcerting. Linux most certainly can play games — if the game developer is willing to develop with it as a target, and if video card manufacturers are willing to support their offerings adequately on the Linux platform. Case in point — with an older Nvidia card, as long as direct rendering is set up properly in X (which is a function of having the right video card drivers enabled), one can play Doom 3 and get better frame rates under Linux using Doom’s OpenGL support, than one can get on the exact same machine, under Windows XP, using the “default” DirectX support.
So, if developers wanted to support Linux, they could. Doom 3’s Linux binary apparently only came as an afterthought, showing up about three months down the road, with no indication they were part of the original development timeline. Yet, with a little bit of tweaking, apparently their original code was ported over with (relative) ease, and Linux got a feature-complete game that, without all the bloated overhead Windows (and accompanying antivirus/antispyware and ridiculous pre-loaded OEM software) invariably takes up.
That said, a lot of game designers never had Linux as a target customer group, either because it would take hiring a competent Linux programmer to do the tweaking (and we don’t generally come cheap, like .NET scripters do, because we’re few and far between), or it would take using the OpenGL architecture across the board and forego all those nifty Windows-based developer tools that Microsoft provides as incentive to game developers, or the bigwigs just figure that Windows (and sometimes Mac) is more than sufficient to recoup their development costs (if only it’s advertised well enough). So, there’s a lot of games out there right now that have a lot of draw and lasting appeal — from SimCity to Halo to, yes, World of Warcraft — and these games were never designed with Linux in mind. So when people say “I’d switch if Linux did games”, it’s these games specifically that they have in mind.
And that’s where WINE comes in. WINE is a Windows compatibility layer (it stands for “WINE Is Not an Emulator”, by the way), which allows you to run code intended for Windows using some open-source duplicates of Windows DLLs which provide all the functionality that the Windows API calls normally expect to be able to run. And the great thing is, since the last version, most of DirectX 9.0c runs flawlessly. I say “most”, because WINE is a huge game of catch-up, where every release adds a few more API calls and increases WINE’s compatibility with Windows that much more. Problem being, of course, Windows is a moving target. Anyone who’s tried to run a piece of software from one version of Windows on a newer version knows full well how incompatible Windows is with Windows. And yet, WINE can run a vast array of software from Windows 95 through Vista, many of them with very little arcane setup necessary.
Such was the case Friday night when I tried running World of Warcraft under WINE on my desktop. The ease of setup during this test case completely blindsided me, though, after how much hacking it took just to get it running on Samo’s computer last weekend.
By way of explanation, first, Sam’s computer is a Dell Dimension 5150, just upgraded to 3 gigs of RAM, with an ATI Radeon X300 on PCI Express, and an Intel 2.8GHz processor. It’s a decent machine, more than capable of running WoW with all the settings on high under Windows with the proper Radeon drivers. Once I dual-booted it to Linux, Compiz work brilliantly without any special configuration. WoW, however, was nothing short of a dog’s breakfast. First, nothing but the “fog” or “glow” effects were displaying, so the intro showed a great green cloud along the ground and a glowing blob where the frost dragon should have been. Trying to log in, showed big chunks of the player’s model in seemingly random places as transparent, like sections of her arms and legs and torso just didn’t exist. As well, Sam had logged out inside a building when she’d last played the character, and there’s apparently a bug with the minimap on ATI cards under WINE. After disabling a bunch of features, running the game in OpenGL, and hacking the WINE registry to disable some DirectX calls, I managed to get the game running in a relatively stable state, however most of the graphical effects were ugly or missing (and some other player characters showed up as white models), and the framerate, despite being stripped down to almost nothing graphically, was down around ten or fifteen frames a second in a wholly unpopulated area — utterly unplayable, not to mention ugly.
And yet, I tried it on my own computer, just to see if I could get things working any better with my Nvidia card. To put things in perspective, I had built my computer out of parts, which I had bought probably about a year after Sam’s family had bought their Dell. Its specs are as follows: dual XFX-brand NVidia 8600 GT cards in SLI, 64 bit dual-core 2.0GHz CPU, and 4 gigs of RAM. This is better than Sam’s by a good sight, however the SLI configuration isn’t coded for in WoW, much less in Linux’s version of the proprietary NVidia drivers, so under Linux only one of my cards would be getting any kind of workout. So, that it would work better, was not a surprise at all, it was more a matter of exactly how much better, and how much tweaking it would take to get it to that stage. What WAS a surprise is that I did absolutely nothing special to get it running. I installed WINE, then ran WoW to see what I’d have to tweak, in its default configuration (using DirectX rather than OpenGL), and it all… just… worked. My jaw dropped when I saw the frost dragon in all its glory fly out of the distance, land and roar, easily as beautifully as it does under Windows.
Right now, it runs with an unshakeable 50FPS (limited to this intentionally), while using about 40% of one of my two processors, with my LCD’s full native resolution of 1280×1024, and every graphics feature turned all the way up. I haven’t tried unlimiting the framerate, or disabling a specific GLX extension DirectX API call that was recommended on a number of WINE forums for both ATI and NVidia cards, and yet it’s still running beautifully. I’m absolutely certain I could get it running even better, with effort, at that — probably merely by running it under OpenGL, in fact.
So with all this in mind, I have every intention of pulling out my second card and bringing it over to Sam’s. The nice thing is, I know I won’t have to do anything special to get Linux to work with it, just throw it in and follow the prompts for the Restricted Drivers wizard. Under Windows, though, I’d have to download drivers from NVidia’s website while in the craptastic 640×480 VGA “compatibility mode”, and hope I got the right ones and don’t have to downgrade to an earlier version, as even my own video card is getting on in age. And if WoW works under Linux, then I’ll have successfully sold someone on Linux who, while fed up with Windows’ fragility and instability, never would have tried Linux on her own.
I wonder if this is what a religious person feels like when selling people on the stick-and-carrot of heaven and hell.