Skip to content

Instantly share code, notes, and snippets.

@Zarkonnen
Created March 7, 2019 06:40
Show Gist options
  • Save Zarkonnen/668ec1ee6a7291dcdb046f173f7e3784 to your computer and use it in GitHub Desktop.
Save Zarkonnen/668ec1ee6a7291dcdb046f173f7e3784 to your computer and use it in GitHub Desktop.
RUNNING YOUR OWN AIRSHIPS MULTIPLAYER SERVER

RUNNING YOUR OWN AIRSHIPS MULTIPLAYER SERVER

Last edited: Mar 7, 2019

If the Airships multiplayer server is unavailable, you can also set up and run your own. By having bought a copy of Airships: Conquer the Skies you are explicitly permitted to operate your own multiplayer server instances for the game. This is also to ensure that the game can keep on being played in the long term.

Note that you can always create multiplayer matches by using the Host/Join options and connecting directly to another player's IP. But if that is not possible due to NAT, or if you'd like the lobby system that the multiplayer server provides, here is how to set it up:

You will need Java installed on your machine for this.

On Windows and Linux: From the command line, invoke the following command: java -Xmx256m -cp game.jar com.zarkonnen.airships.Server

On Mac: From the command line, invoke the following command: java -Xmx256m -cp Airships.app/Contents/Java/Airships.jar com.zarkonnen.airships.Server

This will start up an Airships server. You then need to tell any copies of Airships that should connect to that server where to find it. To do that, edit launch_settings.json and set customMultiplayerServerAddress to the IP address (IPv4 or IPv6) of the server.

You can control the server settings by adding a file called standalone_server_settings.json to the game directory that looks like this:

{
    "maxNetworkReceiveBytes": 50000,
    "maxClients": 12
}

maxNetworkReceiveBytes specifies the maximum message size that the server will accept. The default for the official servers is 50kB to prevent malformed or malicious messages from bringing down the server. For a privately run server, you can increase that, but note that the larger maxNetworkReceiveBytes, and the more players, the more memory the server needs. You can control the maximum RAM available to the server by changing the -Xmx parameter, eg -Xmx1024m gives it up to 1 GB of memory. Note that on Windows, allocating more than a GB of memory to a Java process may cause it to spontaneously exit for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment