Introduction
Last time, we looked at a way to run Windows applications inside Linux with Win4Lin. Using an emulator like Win4Lin, applications such as those in Microsoft’s popular office suite work the same way they do in Windows and with acceptable performance. However, when using Win4Lin or VMWare, keep in mind that no emulator is 100% Windows compatible. Neither supports DirectX. If we want Windows gaming in Linux, we will have to look elsewhere.
Recently, TransGaming Technologies came on the scene with software designed to do just that. The goal of TransGaming is to run off-the-shelf DirectX games inside a Linux environment, and they plan to do it one game at a time. The latest version, WineX 2.0, provides initial support for DirectX 8 and adds Max Payne to their list of officially supported games.
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.
The Monthly Fee
Usually, when you buy software, you walk into a store, put down $50, and take it home. TransGaming is taking a different approach. If you want WineX, you pay a monthly fee (3 month minimum). For $5/month, you can download WineX as often as you like. This is actually very important since WineX is still under heavy development, and while your favorite game may not be supported yet, if it is a popular game, odds are that it soon will be. With a subscription, you also gain access to support forums and the right to vote in the polls. Gavriel State, CEO of TransGaming, has been known to answer questions in the support forums, so at least for now you are getting tech support with a capitol “T”.
Ask And You Shall Receive
That’s right, as a subscriber, you run the company! Well, not really, but you can influence the future direction of WineX development by voting in the polls. In fact, the decision to add DirectX 8 support was a result of the very first poll which closed in December. The current polls include everything from adding general features to getting better support for specific games. (Officially supported games get the level “5” rating.) Future directions for WineX include more work on DirectX 8, official support for Civ3, and a kernel module for better performance. As a subscriber, you can also propose your own questions for future polls.
WINE Gets The Big Fork
We say that code gets “forked” when there are two versions of it from independent development teams that never get put back together. This happened to the UNIX operating system years ago, and now it is about to happen to the Wine project.
The community of Wine developers recently voted to switch to the GNU LGPL license (similar to the one used by the Linux kernel). This a problem for TransGaming because WineX uses proprietary interfaces needed by most Windows games for copy-protection. In order to comply with the LGPL, TransGaming would need to release all the source code in WineX. According to their reading of the Digital Millennium Copyright Act (DMCA), this is against the law in the United States. Instead, they have decided to keep working from the current code base and not use any Wine code released under the new license. The “ReWind” project will be the development site for the forked version of the code. Unfortunately, this means that TransGaming will not be able to take advantage of future enhancements to Wine made by other developers, and the Wine project will not get any of the work done by TransGaming. Realistically, they had very little choice, since the majority of Windows games use copy-protection. The Wine project will continue as usual at winehq.
Test Setup
Hardware | |
Processor | AMD Athlon XP 1800+ (1.53 GHz) |
Motherboard | Soyo Dragon Plus! (KT266A) |
Memory | 1x 256 MB PC2100 DDR SDRAM, Crucial |
Graphics Card | GeForce 3 Ti 200 (Gainward), 64 MB |
Hard Drives | 9 GB SCSI 10,000 rpm Seagate Cheetah (ST39103LW) w/ Linux 9 GB SCSI 10,000 rpm Seagate Cheetah (ST39103LW) w/ Windows 2000 |
Windows Drivers & Software | |
Graphics Driver | 2.1.8.1 |
VIA KT266A Driver | VIA 4 in 1 v4.35 |
DirectX Version | 8.1 |
OS | Windows 2000 |
Linux Drivers & Software | |
Graphics Driver | NVIDIA_GLX-1.0-2880 NVIDIA_kernel-1.0-2880.mdk82up |
OS | Linux Mandrake 8.2 |
Linux kernel | 2.4.18.6mdk-1-1mdk |
XFree86 | 4.2.0-10mdk |
Benchmarks | |
Quake III Arena | Windows retail version v1.11 Linux retail version 1.11 Graphics detail set to “High Quality” Benchmark using “demo001” |
Max Payne | Windows retail version patched to v1.05 Benchmark using 3D Center’s “Max Payne Benchmark-Mod” |
Linux Gaming Performance
If there is a problem with performance in WineX, we need to make sure it is really WineX and not the Linux implementation of Nvidia’s graphics drivers. For the first test, we wanted to use a game that has a native Linux version in order to compare performance with Windows. We needed look no further than Quake III Arena, which has retail versions for both Windows and Linux.
Quake III Arena: Windows v. Linux
Nvidia makes great Linux drivers. At low resolution and color depth, the Linux performance even exceeds Windows. This should come as no surprise since Nvidia’s drivers share a common code base. Now let’s see how well WineX does in the same test.
Quake III Arena: Windows v. WineX
First of all, I want to say that I was very excited to be running the Windows version of Quake III Arena in Linux. I did not notice any problem with compatibility. However, the frame rates in WineX are truly terrible when compared to either Windows or Linux. Since there is a Linux version of Q3A available, no one should ever use WineX to play Q3A, but it is still interesting to run as a benchmark. Also, keep in mind that even a mere 50 fps is fast enough to play Quake, though there is definitely something weird happening. The frame rates in WineX appear to be independent of the resolution and color depth. The graphics card is definitely not the bottleneck here.
Next, let’s look at performance for a popular DirectX 8 game: Max Payne.
Max Payne: PCGH’s Final Scene No. 1 (MAX Quality)
Wow! You can now play Max Payne in Linux. Again, there were no problems with compatibility. (This is a level “5” rated game.) The frame rates are not much better than for Quake III Arena, but the higher polygon count now makes the game less enjoyable to play. I decided to drop the texture quality to see what would happen.
Max Payne: PCGH’s Final Scene No. 1 (WineX 2.0)
Dropping the texture quality by setting all sliders to their minimum values and texture sharpness to LO brings the frame rates back up to Windows levels (set to MAX Quality). Finally, we see that frame rates are getting worse with higher resolution, but it still is not clear what is causing the problem with performance. Max Payne is now playable at MIN Quality settings.
Windows Gaming At Half The Speed
Everyone needs more than 640K, but there is a point where more frames per second is not noticeably better. For a low polygon count game like Quake III Arena, WineX gets pretty close to that magic number of 60 frames per second. For a modern DirectX 8 game like Max Payne, it does not do quite so well. Keep in mind that these tests were run on mainstream hardware (Athlon XP 1800, GeForce 3 Ti200), so a better CPU or graphics card may help. In general, Windows performance is at least twice what WineX can deliver.
The great thing about WineX is that it is still fairly new, and just like Linux, it keeps getting better. Support for DirectX 8 will continue to improve and the kernel module should give a noticeable performance boost when it arrives. Since you can try WineX for as little $15 (the cost of a 3-month subscription), I recommend it to anyone that is already running Linux. Go ahead and download the precompiled binaries and give it a test drive.
However, I would not expect to play games that do not have at least a “4” or “5” rating. The current list of games with a “4” or “5” rating includes: Diablo 2, Max Payne, The Sims, Jedi Knight 2, Sacrifice, WarCraft II, Baulder’s Gate 2, and DeusEx. Civ3 will be added shortly. But don’t get rid of your dual-boot just yet. Depending on your hardware, some games may not have acceptable performance, and whatever you do, don’t forget to vote.