How to set up a peer-to-peer game

Peer-to-peer game setup

These are instructions for running a peer-to-peer game. If you want to run a game using either the central Vassal server or a private server, see these instructions.

Setup

We suppose we have two machines A and B both connected to the same Local Area Network (LAN), and two users seek to play the module Battle for Moscow

Machine A B
LAN IP 192.168.1.2 192.168.1.3
User a b
Password a b

To set up a peer-to-peer game, the following procedure should be followed.

If you want to run a game with more than two players, then duplicate the instructions for client B as needed.

On both clients

  1. We start the Vassal and load the selected module. When prompted to choose the play mode, we select Look for a game online

  2. We then click Finish

  3. Now the module has been started up, but we have not yet started a game. First, we need to set-up the connection between the two client.

    Press the Show/Hide server controls (Alt-S) connect button in the toolbar.

  4. If already connected to a server, press the Disconnect button disconnect

  5. Now right click the server button and select P2P Network

  6. Now click the Connect button connect - not the button with the word “Connect” on it, but the one with two arrows.

Only on client A

  1. Press the button with the word “Connect” on it.

  2. This will pop=up the Direct Connection dialog. Press the Add button at the bottom.

  3. This will pop-up yet another dialog with three text fields in it.

    The fields are

    • Description: A free format string. Here we will choose B
    • IP Address: The IP address (4-tuple of numbers) of the other client we want to connect to - in our hypothetical set-up this will be 192.168.1.3
    • Port: The port number we want to use. We will leave that as 5050 but we could choose a different number if we are running many pier-to-pier games.

    Now press OK

  4. Back in the Direct Connection dialog, select the newly added entry and then press the Connect button.

    Close the dialog afterwards.

  5. Both clients will now show the connection.

  6. Still only in client A, we can now start the game via
    File→New Game

  7. Client A will be prompted to select a side

    Press Finish after selecting the side.

  8. This will start up the game as per normal.

Only on client B

  1. Select the a user in the Current Game Room and right click i to show a context menu. From that context menu selec Syncronize

  2. Client B will be prompted to select a side

Both clients are now connected

You and your follow player can now start to play the game.

Problems with syncronisation

If it seems like a client is out of sync with the other client - typically after a client machine suspends or you switch to another application for an extended period of time - you may need to syncronise the two clients again.

In the server controls interface, in the Current Game Room panel, right click the other player and then select Synchronize.

1 Like

To be a bit fussy - this is peer to peer. A pier is a jetty, wharf or similar. Good work though.

1 Like