From FreeOrionWiki
Revision as of 20:28, 5 February 2015 by Dilvish (Talk | contribs) (Connect to Server)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

FreeOrion supports multiplayer games in a host-client mode. One player's computer (or a separate server should also be possible) acts as the game server, which the other players' computers must connect to. Multiplayer in hotseat mode is not supported directly, but could be emulated by running several clients on the same computer, and trusting opponents not to look at each others' clients.

Hosting a game on local server (your computer)

To host a multiplayer game with your computer acting as server, start FreeOrion as normal, choose "Multiplayer" and enter your player name. Player names should contain only letters, numbers and underscores (a-z, A-Z, 0-9, _) and no spaces.

After pressing "Okay", you will see a window "Multiplayer Setup", where you can configure the game parameters.

Please note that player names, empire names and colours must be choosen unique, or the button "Start Game" will not be active.

Hosting a game on external server

To host a multiplayer game on an external server, the process is generally identical to that for hosting a game with your computer as server, above, except for how the host starts up their FreeOrion client, and of course also regarding starting up the external server.

The external FreeOrion server must be started first. For a Windows OS, the executable is "FreeOrionD.exe"; for OSX and Linux it is "freeoriond". It requires no special switches/parameters when starting. Next the host starts up FreeOrion (Windows executable "FreeOrion.exe", OSX and Linux executable "freeorion"), using the additional command line switch "--external-server-address <server-address>", where "server-address" is replaced with either the DNS name for the server location or else its numeric ip address. This process can be tested locally by starting the server on your computer and then starting the FreeOrion client with the above switch, specifying no server-address (it defaults to localhost). When the (first) player connects to the server using the --external-server-address switch, their client becomes the manager of the game. The rest of the process will be the same as for a locally hosted multiplayer game, above. Other players joining will simply join in the normal fashion.

Game end and other player disconnection events will cause the server process to terminate, and so if being run at a remote location in an automated fashion, there should be means for restarting the server process after it has terminated. In OSX or Linux it should be sufficient to run a simple shell script with a loop within which freeoriond is executed; on a Windows server a .BAT file can server the same role. The server will be sensitive to the host disconnecting once the host client has connected to the external server and advanced at least to the multiplayer galaxy setup screen; it will not be sensitive to other players disconnecting until after the game has started.

Joining a game

In the main menu choose "Multiplayer", enter your player name and choose a game out of the list. Or you can manually enter a host name or IP address at the bottom of the Multiplayer Dialog. Keep in mind that "localhost" is just a nickname for the current computer and so except for a hotseat game is not suitable to be used by someone trying to join a multiplayer game. Currently there appears to be a problem with the displayed listing of available games; a game may not be listed even if it is available. If you have entered the correct IP address but no game is listed, you can still try clicking the 'OK' button; if a game is available at the specified IP, the connection should go through provided that there is not a serialization mismatch. Windows & MacOSX have compatible binary serialization, but for multiplayer play between either of those two systems and a Linux system, xml serialization must be used-- the host and all players should visit Options->Other and un-check "Binary Serialization", and then restart FO.


FreeOrion multiplayer connections use TCP port 12346. You may need to forward this port in your router or firewall.

The discovery port uses UDP 12345 and is used to detect available game hosts. You don't need to forward this port to run a game.

Multiplayer Connection & Setup

When starting or resuming a multiplayer game, initially you will be taken to the Connect to Server dialog. After hosting or joining a game, you will be taken to the Multiplayer Setup dialog.

Connect to Server

At the top of the Connect to Server dialog, you may enter your Player name. Just below, you may select whether you wish to join an already existing game, or host a new game yourself.

If hosting, you need only click OK after entering a player name.

If joining a LAN game, clicking Refresh list should list any games on the local network waiting for players. Select one of these and click OK to join. If no game is displayed it may still work to manually specify an IP address and click OK.

If joining an internet game, you need to enter the IP address of the game you wish to join, then click OK.

If the connection is made successfully, you will then be taken to the Multiplayer Setup dialog. If there is a problem with the server connection timing out, take note of potential serialization compatibility issues, mentioned above.

Multiplayer Setup

After connecting or starting a new server, you will be taken to the Multiplayer Setup screen, where the game may be configured and players assembled before a game begins. At the bottom left of the Multiplayer setup screen, you may enter chat messages which will be sent to other players in the game, and seen in the column above.

New Game

If you are hosting a new game, you should ensure that the "New game" option at the left side of the Multiplayer Setup dialog is selected (which it is by default). Adjacent, various options may be set to configure how the game generates the galaxy for the new multiplayer game, just like the single player Galaxy Setup dialog. If you have joined a game that another player is hosting, these options will be disabled, though you can see what settings the host has chosen for the game.

When you join or host a multiplayer game, your player name and all other players' names are listed at the bottom of the multiplayer dialog. Each player needs to pick a unique empire colour and enter a unique empire name before the game can be started.

After all players have chosen unique empire names and colours, the host may click Start game, at which point game will generate a new galaxy, and after a few moments, bring all players into the game itself.

Load Game

If resuming a previously saved multiplayer game, the host can select the "Load game" option (instead of "New game") and then specify which save file to load in the drop-down list.

Players that join need to select which empire they will be playing in the saved game. Each player needs to pick a different empire before the host can start the game.