Running Aliens vs. Predator Gold with Wine

Updated 30th October 2012

Installing Wine
Xorg settings
Installing AvP Gold
Installing network libraries
Game settings
Co-operative play
When the game hangs
About the native port


Aliens versus Predator Gold is an excellent horror 1st person shooter, that was originally released 2000. It is actually just a slightly modified version of the original Aliens versurs predator game. Gold edition has a completely reworked network play, several new multiplayer maps and a couple of extra weapons. Otherwise the games are identical.

There are two ways to play this game under Linux: using the native Linux port, or by using Wine. The native Linux port is currently abandoned by it's author, but the source code (released as GPLv2 is still available, and can be compile on modern Linux distributions. It takes a bit of work the get compiled, and does not support network play. Once it's up and running, it works very well. AvP Gold runs quite well under Wine, though not as well as the native Linux port. There are a couple of minor annoyances with the game, but none of them are showstoppers. This HOWTO describes how you can play AvP Gold in single player and multiplayer modes by using Wine.

AvP works well with recent Wine versions. There was a rather long period between 0.9.15 and 1.x when AvP was unplayable due to various bugs. These bugs were probably caused by the new, rewritten DirectX (or 3D) subsystem in Wine. Here's a list of Wine versions known to work - or not to work:

In any case you should take a look at the AvP page in Wine's application database to see if there are any new bugs that might affect the game.

AvP did not work properly on (some?) semi-recent distros due to a bug that allows the mouse pointer to leave the application window. This rendered the game completely unplayable. I encountered this problem on Ubuntu 9.10 using multiple Wine versions (1.1.7, 1.1.31, 1.1.36 and (then) latest development version on 22nd Jan 2010). Several workarounds were suggested in the bug report, but none of those which I tried did any good. It seems something had changed in Wine's environment (e.g. X11) as even Wine version (1.1.7) failed on me, whereas it had worked well previously. Fortunately the bug seems to be gone in Ubuntu 12.04 + Wine 1.4.0 when running in fullscreen mode. So, for a change, the game is once again fully playable.

Installing Wine

There are no specific steps required in installing Wine, and you can refer to the Wine documentation. It's no longer necessary to compile Wine yourself on most Linux distros; usually you can just add a Wine repository to your distributions package manager. If you choose to compile Wine yourself, make sure you install the recommended development packages before trying to compile Wine. See http://wiki.winehq.org/Recommended_Packages for a complete list of recommended packages for various Linux distributions. If you are using Debian or Debian derivative, such as Ubuntu, you can use the command

apt-get build-dep wine

to pull down all necessary development packages automatically. When you've installed all the necessary dependencies, unpack the source and do a

make depend && make
sudo make install

If you are running Ubuntu 6.10 (Edgy), use CFLAGS=-fno-stack-protector ./configure or Wine will not work at all. AvP Gold works quite well even with the default Wine settings, but you might want to run it inside a Wine virtual desktop if it seems to crash too often. I've encountered systematic crashes when leaving network play - at least on Wine 0.9.15. For more information about this game under Wine, refer to Aliens versus predator in Wine AppDB.

X.org settings

You might have to set X.org's DefaultDepth to 16 or perhaps 32 before trying to launch AvP. It seems that 24 bpp does not work at all. If you're running Compiz/Beryl/Compiz Fusion, you might want to disable it while playing AvP. Version 0.9.45 of Wine did not seem to mind, but older versions (like 0.9.15) refused to work correctly when Compiz was running.

Installing AvP Gold

My AvP Gold came on two CD's, one of which is an audio CD. The game itself is on the other CD. The game installation uses a stupid copy protection scheme, which requires you to insert the Audio CD into the drive during install. If you are trying to install the game under Wine, the CD validation check will fail. Therefore you will have to install the game in Windows or use the workaround given on AvP Gold's Wine AppDB page. I originally installed the game in Windows 98 running in Vmware, and everything went smoothly. This "copy protection" does not actually stop anyone from copying the game; once the game is installed, it can be moved to another Wine installation without touching anything or "installing" it. Once you've installed the game in Windows, you can simply copy the necessary files to your Wine directory (for example $HOME/.wine/drive_c/Program Files).

Installing network libraries

This game was never a really big hit a'la Quake, so there are probably no public servers available for network play. It is however possible to play this game inside a LAN, so you might want to install the necessary network libraries, which are not installed by default. See this link for more information: http://wiki.winehq.org/DirectPlayGames. Next create DLL overrides for each one of these libraries using winecfg. DLL overrides can be found from the tab "Libraries". In addition to the libraries mentioned on that page, you will need to copy dplaysvr.exe from C:\\Windows\\System32 to Wine's System32 directory. The dplaysvr.exe seems to be the server component for AvP Gold, so you can't host any games if you don't have it installed.

NOTE: If you just want to play this game by yourself, you can safely skip all this. The game works just fine without these libraries - just without network play.

Game settings

Once you get into the game, all you need to do is tweak the controls as you see fit and change the video mode. Select a Direct3D video mode with appropriate depth (for example Direct3D 1024x768x16. Selecting the video mode is mandatory, as the actual game will not start if you don't. Next quit the game to save the settings and restart the game. That's it.

Co-operative play

Biggest part of AvP fun is of course co-operative play, in which the single player levels are played together with friends. Even though AvP does offer a play mode called "co-operative", it means simply an endless battle agains unexhaustible supply of aliens. This not that much fun at all. Luckily there's a very simple way to cheat the game to use standard single player maps:

  1. Make a backup copy of the map jockeycoop.rif in directory avp_rifs
  2. Copy a single player map from avp_rifs to it's place (=rename it to jockeycoop.rif)
  3. Start the game
  4. Start a new co-operative game with map jockeycoop
  5. Connect from the client to the server
  6. That's it! Have fun!

If want a real fight, try googling with "Aliens versus Predator Gold co-operative" and you will probably stumbly across a modified set of AvP Gold maps. These maps pack hundreds of aliens each level, so you can play them together with several friends. The basic AvP maps are a bit too easy for co-operative play, because there just are not enough aliens on each level. If I remember correctly, I found the modified Coop maps from Fileplanet - a terrible site - but I finally managed to download what I wanted after waiting for hours in their ridiculous queue. Luckily the download worked even though I did not have Internet Explorer.

When the game hangs

When playing AvP Gold in multiplayer mode the game consistently hung whenever trying to "Abort game". In this situation it is easiest to do the following:

  1. Switch to a virtual terminal with Ctrl-Alt-F1
  2. Login as "root" (or as yourself, and switch to root with sudo)
  3. Issue a pkill myusername: this will kill all processes owned by you
  4. Restart the display manager, usually with /etc/init.d/gdm restart or /etc/init.d/kdm restart
  5. Login and restart the game

About the native port

There is a native port of AvP (Git repo here) for Linux which used to work great, but does not have multiplayer support. It was abandoned for a while and compiling it was getting increasingly difficult on modern Linux distributions. Later, it's author modernized it and it works well on fairly recent distributions such as Ubuntu 9.04. However, building it on modern (2012) 64-bit operating systems using 32-bit compatibility libraries can be painful. In those cases it's probably easiest to just run AvP in Wine.

Some notes regarding the native port: