Skip to main content

Windows Gaming In Linux With WineX 2.0

DirectX Without Windows

In the early days of 3D gaming, developers had to write a lot of extra code to get decent performance from the myriad of graphics cards. DirectX simplied the work for game developers by allowing them to write to a common application programming interface (API) while still giving excellent performance on graphics hardware. Today, virtually all Windows games use the DirectX API. You may be wondering how it is possible to run these games in Linux when Microsoft has not provided these APIs for Linux. The answer is: for the same reason that you do not need to buy your PC from IBM. Three key developments made this possible.

The first is the Wine project . Wine is the open source effort to create a set of Windows APIs for Linux. Emulators like Win4Lin create a "container" that looks like a PC so that you can install a genuine copy of Windows. What Wine does is create a container for Windows applications that looks like a Windows operating system. As you can imagine, pretending to be a PC is much easier than reverse engineering all of the Windows DLLs, and in general, Win4Lin and VMWare will have better compatibility than Wine.

The Wine developers have been at this a very long time (since 1993) and Wine is still in development. Until recently, the code for Wine was being released under an "X11" style license that allowed unrestricted redistribution. This is why a company like CodeWeavers is able to release a tweaked version of Wine with better support for Microsoft Office. CodeWeavers returns all changes back the Wine project. This is how open source works.

The next thing that happened was that Linux got good driver support for graphics hardware. Ask any Linux gamer, "Who provides the best driver support for 3D graphics?" and you will get the same answer: Nvidia has the best Linux driver support - bar none. Nvidia's OpenGL GLX driver allows Linux gamers to get the same frame rates as in Windows. This is possible because Nvidia uses the same code base as they do for their Windows driver.

At this point, the stage was set for WineX. Instead of starting from scratch, TransGaming decided to use the code from the Wine project, and add support for DirectX. The way they do this is by mapping DirectX calls to their OpenGL equivalents. TransGaming also adds support for some propietary interfaces needed by most games that use copy-protection.

Even WineX has limitations. Since good OpenGL performance is required, TransGaming only supports Nvidia graphics hardware. This could change if other graphics card vendors improve their Linux drivers, but for now Nvidia is the only game in town. It goes without saying that since Wine does not emulate instruction sets, you have to be running x86 hardware. On the software side, many games still do not work, and others will have bugs, but certain games with a rating of "5" should work just as they do in Windows. TransGaming has a rating system to help users find out the level of compatibility for their favorite games.