Get Your Game On

Running Windows Games in Linux

Dee-Ann LeBlanc

Issue #141, January 2006

Windows gaming on Linux has its ups and (mostly) downs, but there are viable options for some games.

More than 300 games are available for Linux today. However, plenty more are out there that are available only to Windows users, and if there's one thing Linux users don't like to accept, it's that we cannot do something everyone else can do. To that extent, a number of products and projects exist that make it possible to play Windows games under Linux (and to run other Windows programs as well). A quick list of these options include the WINE Project, Win4Lin, CrossOver Office, TransGaming's Cedega, VMware and the simple fact that some games, such as many of those from Id Software (creator of DOOM, Quake and so on) actually have binaries available that let you run the game natively under Linux.

Let's take a look at each of these options, see how it fits into the big picture and how likely it is to run the types of games you like, keeping in mind that sometimes the games you'll be able to use are older games rather than newer ones.

WINE—The Free Solution

The WINE Project's software (see the on-line Resources) allows people to run MS-DOS and 32-bit Windows applications under Linux and the free BSDs. Whether WINE will run your particular game is heavily dependent on a number of factors. Because this is free software, your best bet is simply to give it a try and see if it works. Depending on which Linux distribution you're using, WINE may be difficult or simple to install. You may find that WINE is bundled in your distribution's core or external package repositories.

Those who don't have this option can go to the WINE site and click the Download button. You may find a prebuilt package for your distribution there. If there isn't a package available, follow one of the WINE Source Downloads links and then follow the instructions in the README file for how to build this program.

Once you have WINE installed, attempting to run a Windows program using this tool is actually not that difficult. First you need to get the program onto your system, whether by mounting the CD-ROM or DVD-ROM containing it, or by downloading or copying the software onto your machine. Then, if this is software you need to install, you need to determine which program launches the installation—this is typically INSTALL.EXE or SETUP.EXE. From inside the directory where the program lives, type wine program. For example, wine INSTALL.EXE.

More often than not, the installation program will launch properly. You might even be able to install the software fully using WINE. If that's the case, don't get too excited yet. The real test is whether the software will run. Programs installed inside of WINE are placed in ~/.wine/drive_c/Program Files/. You also may have launcher icons on your desktop. If you're starting the program by hand, navigate to the directory containing the program, and then type wine program just as you did before. So, if you were trying to see if you could get the game Bejeweled running, you might change to ~/.wine/drive_c/Program Files/PopCap Games/Bejeweled, and type wine WinBej.exe. This is the moment of truth. It either will run or it won't. If it does, rejoice! If not, you can search the Web for tips on how to get the particular game running under WINE, or you can try another tool.

Unfortunately, I've had very poor luck getting games to run under WINE, personally—much of that is due to a refusal to spend four days hunting down every possible configuration tweak. I'm sure someone will take away my official Geek card for that. Frankly, I have better things to do. The closest I got this time was pulling out my Classic Text Adventure Masterpieces CD with old Infocom games. The installer worked, and the games would launch, but then they died. Ah well, it was a bit of nostalgia anyway.

Win4Lin—Running Windows inside Linux

Win4Lin is a commercial product (see Resources), and this section focuses on Win4Lin Pro, which allows you to install Windows 2000 or XP inside a Win4Lin framework, which is installed on a Linux system. Essentially, it lets you run a Windows machine inside a Linux machine. Although this product is meant primarily as a business tool, if you have it for “practical” purposes, then why not try using it to run games that you can't get to run in another way? Because this is a commercial tool with plenty of documentation, installation instructions and starting Win4Lin are left to the manuals.

Now, first off, on an older machine like an Athlon 1.2GHz with 1GB of RAM, don't even bother. The virtual Windows XP box functions at a snail's pace for just about any operation, even opening folders. Playing any games except for untimed casual ones (for example, Bejeweled, which did work for me) is essentially impossible due to the performance hit—though you get this hit only inside the Win4Lin session, the rest of the machine functions normally. Mind you, one of the older games I always test under emulators, because I kind of miss it, is SimTower, and this is the first time I've gotten it to run. However, World of Warcraft couldn't start its install, because the installation program gave an error claiming it couldn't find a data file.

Note that to get Bejeweled to work, I had to copy the files off of the CD-ROM and install straight from my hard drive. The CD is both a data and music CD, and both Linux and Windows seem to get fussy with it from time to time.

Figure 1. Bejeweled, being played inside Windows XP under Win4Lin Pro.

CrossOver Office

CrossOver Office is, again, a commercial product designed for running “serious” Windows programs, but that doesn't mean you can't use this software at least to attempt to play games. CrossOver Office is available from the CodeWeaver's Web site (see Resources), and once you have it installed, you can convince it to try installing any Windows program that isn't on its list by launching its Install Windows Software tool and clicking the Install unsupported software button.

As with the others, don't get too excited if you can get a game installed. That doesn't mean it will run. For example, World of Warcraft does manage to install under CrossOver Office—mind you, the text on the installer's buttons is almost too tiny to read—but SimTower's installer malfunctioned and wouldn't work. I found an old RISK CD lying around and discovered to my amusement that it refused to install because it works only under Windows 95.

In fact, World of Warcraft's opening movie plays under CrossOver Office as well, and the game starts and is able to start downloading patches. Although it crashed at this point, frankly I found it impressive that the software even got that far. That encouraged me to pull out something older. I tried The Sims but that made the CrossOver Office installer decide that it suddenly couldn't access the hard drive. SimCity 2000 not only installed, but actually plays, albeit a bit slowly on this system.

Figure 2. SimCity2000, being played under CrossOver Office 5.0beta1.

VMware

Due primarily to the expense (VMware Workstation costs nearly $200 US), most people who use VMware are doing so for work-related reasons. However, again, if you have this virtual machine tool lying around, and your computer is powerful enough to run a VMware session quickly enough to play mainstream games inside without problems, then this is another avenue to explore. On the same machine in which Win4Lin with Windows XP crawled, Windows XP under VMware runs at perhaps twice the speed.

VMware so far is the only one out of the bunch that was able to launch the installer for The Sims. Not only could VMware install it, it could actually run the game.

Figure 3. The Sims, being played within Windows XP in VMware 5.

Then I figured it was time for the big test, World of Warcraft. First I had to allocate more hard drive space to my VMware session, which involved figuring out how to get Windows XP to see and use the new drive (a process I did not find intuitive at all, not being a Windows XP user aside from the occasional screenshot). Once the installation was complete, I tried to launch World of Warcraft and was told that 3-D support couldn't be started, so I finally got around to installing the VMware Tools package, which is supposed to—among other things—improve graphics performance. Although some might claim that VMware doesn't support Accelerated 3D, this is actually no longer true. However, that support is “experimental”, but it doesn't get much more experimental than this, so it's worth trying.

To turn on Accelerated 3D, it's important first to shut down the virtual machine. Once this is done, it's time to edit the .vmx file for the instance. The VMware documentation recommends adding the following three lines to the file:

mks.enable3d = TRUE
svga.vramSize = 67108864
vmmouse.present = FALSE

Once this file is saved and closed, go to the VMware window and select Edit→Preferences. In the Preferences dialog box, choose the Input tab, and click the Ungrab when cursor leaves window check box to remove the check mark. Doing so will make sure that your games don't run into confusion over the mouse pointer. Click OK to save the setting. With this done, it's time to bring the machine back up and try World of Warcraft again. The game detects the “hardware change” and offers to reload default settings. Unfortunately, it's not enough, though at least this time there was an obvious attempt to start the game.

Hoping that an update of the rarely used XP session will help, I submit myself to the ritual of update, reboot, update, reboot and so on. Unfortunately, it wasn't enough. Too bad—World of Warcraft gets tantalizingly close to starting.

Now, can VMware use the half-and-half CD with Bejeweled? Yes and no. It recognizes that both parts exist and allows accessing the files, but it can't actually run the installer and doesn't seem aware of all of the files on the CD. The game does install and run though from files copied off of the CD and onto the hard drive earlier. Bejeweled will not run in hardware-accelerated mode either, so the experimental feature isn't quite there yet. Still, as it improves, the chance of being able to use VMware for higher-end Windows games does too. Hopefully by that point, however, there will be more mainstream games available for Linux natively.

TransGaming

I've saved the most appropriate choice for last among the Windows-gaming options, so this section can end on an upbeat note. TransGaming's Cedega product (see Resources) is essentially a subscription service where you pay a monthly fee for access to the latest versions of the program in binary form, the ability to vote on the games that you would like to see prioritized and more. Because this product focuses on games and implementing the DirectX APIs and other Windows features heavily used by game programmers, the likelihood of a Windows game working under Cedega should be better than under the other options. However, it is not guaranteed.

I'll give the Point2Play interface a shot even though I tend to have hit-and-miss luck with it. On Fedora Core 4, my CD drive shows up as /media/cdrecorder, and even when a disk is mounted onto the system, Point2Play can't see it—even though running the built-in Point2Play tests says that my CD drive is fine. A quick ln -s /media/recorder /mnt/cdrom fixed that problem. However, the Install button still doesn't become visible, so I gave up. There's no other fixes listed in the documentation that I haven't already tried.

There's no Cedega to install the program directly without bothering with the extra GUI. To do so, I mount the CD (in this case, the first CD-ROM for World of Warcraft) and change to its base directory. Then I type cedega Installer.exe and immediately get hit with a stream of errors. Going to the TransGaming Forums and running keyword searches doesn't help, so I post a query; we'll see what comes of that. I had World of Warcraft working under Cedega and Fedora Core 3 so I know it's doable.

Instead, I'll try Diablo II. Point2Play still won't see the CD, so I go to /media/cdrecorder and type cedega install.exe to launch the installer, and it launches just fine. When it gets to the video tests, it recommends Direct3D: DirectDraw HAL, so it does pick up the 3-D functionality on the system. The game also launches fine, though if I run it in windowed mode, I can't click on any other windows or it crashes. Again, none of the potential fixes I find on the boards helps with this.

Figure 4. Diablo II in windowed mode through Cedega.

Summary

There is no perfect solution for playing Windows games under Linux. The best solution is to look and see whether a Linux binary is provided for the game, or to go find games that are written to play under Linux. Id Software and Epic Games both release Linux binaries for their games. Keep in mind that if you opt to use a solution such as Win4Lin or VMware, you have to own a valid copy of the Windows version you intend to use. Solutions such as WINE, CrossOver Office and Cedega implement the APIs without requiring the operating system to be installed.

Still, as you can see, there are many options if you are really determined to play a Windows game in Linux without having to dual-boot.

Resources for this article: /article/8640.

Dee-Ann LeBlanc is the award-winning author of 13 computer books (mostly focused on Linux) as well as an award-winning technical journalist with more than 200 articles behind her. Her latest book is Linux for Dummies, 6th Edition, and you can learn more about her at www.Dee-AnnLeBlanc.com.