Files
wiki/gaming/Multiplayer Warcraft III.md
T

3.4 KiB

Warcraft III: The Frozen Throne is an expansion pack for the tower defense game Warcraft III by Blizzard Entertainment. It was released for Microsoft Windows and Mac OS X in 2003. This article will explain how to get multiplayer gameplay working on Linux.

Dependencies

You will need:

  • Warcraft III: The Frozen Throne for Windows
  • 32-bit WINE
  • Wireguard (not required if playing on the same physical network)

Running Warcraft III with WINE

To run the game on Linux, you must install WINE, a compatibility layer created to allow running Windows applications on UNIX operating systems. There should be a package for it available from your Linux distro.

Once WINE is installed, check that it works by using it to run Warcraft III, as shown below. The game may not play nice with all desktop environments because it changes the screen resolution and runs in full screen. It seems to work acceptably in i3, although unfocusing the game window may cause issues.

$ cd /path/to/Warcraft_III
$ wine Frozen\ Throne.exe

Patching Warcraft III for Online Play

Once you've confirmed that the game works with WINE, it's time to patch it to use different multiplayer servers.

(TODO)

Creating a VPN

Unfortunately, the patched game seems not to work unless all players are on the same network (the in-game "battle.net" player option). The in-game "LAN" option does seem to require all players to be on the same physical subnet.

If the players are in different physical locations, Wireguard can be used to create a Virtual Private Network (VPN). This effectively tricks the players' computers into thinking they are all on the same network. One player must host the VPN, and the other players must then connect to it. (Note that this is independent of who hosts in-game.)

Host Instructions

(TODO)

Client Instructions

To connect to someone else's VPN.

  1. First, install Wireguard. It should be available as a package for your Linux distro.

  2. Then, generate a public/private key pair, like so:

$ wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickey
5TdcJwAMCqkYJhj2jWjMNbC8Lx1+oabvW8sd380z6EY=

The second line above is your public key. You must send this to the VPN host so he can add it to his setup.

  1. Then create a config file, /etc/wireguard/wg0.conf as root:
[Interface]
PrivateKey = ****
Address = 10.0.5.*/24
DNS = 10.0.5.1

[Peer]
PublicKey = ****
PresharedKey = ****
AllowedIPs = 10.0.0.0/16
Endpoint = *.*.*.*:****
  • PrivateKey should be the private key generated in Step 2. It is the contents of /etc/wireguard/privatekey.
  • In the value of Address, replace the * with an 8-bit positive integer (i.e. less than 256) of your choice.
  • PublicKey should be the public key generated in Step 2. It is the contents of /etc/wireguard/publickey.
  • The VPN host must provide you with the value for PresharedKey.
  • Endpoint should be the host VPN's IPv4 address, with the port to use Wireguard on after the :.
  1. To start Wireguard, run the following command:
$ sudo wg-quick up wg0

If it works, the IP address at DNS in the wg0.conf you just created should be pingable. All of your internet traffic will now be through the VPN. 5. To disconnect from the VPN when you're done playing, run the following command:

$ sudo wg-quick down wg0