Wednesday May 23, 2012 2:46 PM AEST

Linux and Games

By Leigh Dyer
15:39 Mar 12, 2008
Tags: Linux | Gaming
«  »
Linux and Games
Wine

Got some doubts about installing Wine? Fear not! We have a full guide in this month's Atomic, which should be on newsstands now!

There’s another way to bring Windows games to Linux, and that’s with Wine, which provides a Windows-like environment to applications by running them against its own versions of the Windows system libraries. Unlike Parallels or VMware, there’s no need for a real Windows licence or installation, and no hardware emulation to interfere with performance.

Wine initially focused on business applications, though it did support some games: Direct3D was a no-go but there was enough DirectDraw support to run 2D games like StarCraft, and some OpenGL-based 3D games, like the original Half-Life, worked well too. It wasn’t until a couple of years ago that work started on a Direct3D layer, using OpenGL to access the hardware and translating HLSL shader programs in to their GLSL equivalents.

Reimplementing Windows and DirectX is a mammoth task, so compatibility is limited, but quite a few games do work. Valve’s games are probably the best example: Wine has good support for both Steam and the Source engine, so you can buy, download, and play Half-Life 2, Portal, or Team Fortress 2 under Linux with minimal hassle.

click to view full size image
Steaming it up under Linux.


Some games require extra DLLs or registry tweaks to get running, but the Wine application database has all of the details on what games work, and how to get them running. You’ll find setup instructions there for hundreds of games, including major titles like World of Warcraft, Civilization IV, Supreme Commander, EVE Online, The Elder Scrolls IV: Oblivion, World in Conflict, and Call of Duty 4.

You can even run Crysis under Wine, and while the graphics are glitchy and the framerate is poor, the fact that it works at all is amazing. Shader support is definitely one of the fastest-moving parts of Wine today, and DirectX 9 shaders have only been enabled by default in the last few releases, so I wouldn’t be at all surprised to see shader-heavy games like Crysis and BioShock running well enough to play within the next few months.

Every distribution should have Wine packages, but development moves so quickly that these will almost always be out of date. The Wine developers themselves maintain up-to-date packages for most of the popular distributions though, so the easiest way to get an up-to-date version is to go to the Wine download page and check the instructions for your distribution.


Performance
Because Wine is a compatibility layer, rather than an emulator running Windows in a virtual PC, it generally performs very well. The performance depends on how good the Wine versions of libraries are compared to the original Windows versions, but most of the core ones are pretty good, so many applications run just as fast under Wine as they do on Windows.

The DirectX layer is the major exception, because of the complexity of implementing Direct3D on top of OpenGL. Translating Direct3D API calls to their OpenGL equivalents adds some overhead, but the biggest performance drain seems to come from translating the data – the geometry, textures, and shaders that make up the game world – between Direct3D and OpenGL formats. When these are loaded ahead of time, the performance can be very good, but it suffers when games need to stream or modify textures or geometry on-the-fly. DirectX 9 shaders also seem to impact frame rates significantly.

Despite the issues, none of the games that Wine supports are really rendered unplayable due to low frame rates. Team Fortress 2 is super-smooth when forced to run in DirectX 8 mode, and Call of Duty 4 is certainly quick enough with enough of the eye-candy turned off. It’s still early days for Direct3D under Wine though, and the focus is still on compatibility rather than performance. As the compatibility improves and more games start to run on Wine, the developers will be able to put more time in to solving these kinds of performance issues.


What about Cedega?
You may have heard of Cedega, a proprietary version of Wine from Canadian developers Transgaming that’s specifically designed to run games. Transgaming pioneered support for DirectX in Wine, supporting a large number of games that standard Wine at the time was completely incapable of playing.

However, Transgaming invoked the wrath of the Wine community by not only charging a $US5/month subscription fee for Cedega, but also keeping its own changes proprietary while benefitting from the other improvements in Wine that the community at large was developing. Transgaming was within their rights to do this, thanks to Wine’s MIT open-source licencing, which is more liberal than the more common GPL licence, but many in the Wine community were still unhappy with Transgaming free-loading on their work.

In the end, the Wine developers decided to relicence Wine under the LGPL licence, effectively forbidding Transgaming from incorporating any future Wine improvements into Cedega. This, along with seeming financial instability inside Transgaming, put a dampener on Cedega development.

Transgaming has recently been buoyed somewhat by success with its Cider product. It’s essentially a version of Cedega that’s designed to be packaged with games, allowing them to run on Linux or Mac OS X with little or no modification, and it’s been used for a number of releases, including the Mac and Linux versions of the EVE Online client and a number of EA Mac ports. Improvements made as part of Cider, such as the addition of DirectX 9 and PS2.0 support, has since arrived in Cedega, and more is promised in the near future.

The problem is that regular Wine is getting so good now, with its support for DirectX 9 and Shader Model 3.0, that in many ways it’s caught up to, and even surpassed, Cedega. In fact, it might be the opposite: Cedega may not run brand-new games like Call of Duty 4, but Wine can, even if it requires patching and fiddling to do so.

Cedega is still a good option if you want maximum ease-of-use: the $5 a month won’t send you broke, and its GUI and built-in games database makes it very easy to get supported games installed and running. If you don’t mind manual tweaking though, and you want to get games running as soon after release as possible, then standard Wine is the best option.

 
«  »
 
This article appeared in the February, 2008 issue of Atomic.

Aliens: Colonial Marines in depth; Z-77 Motherboard round-up; strategy gaming special; Home Server tutorial. PLUS MUCH MORE - ON SALE NOW!
 
Atomic Magazine

Issue: 137 | June, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop