How to set up a networked game

Network game setup

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

Setup for Vassal central server

Suppose we have two clients A and B, and two users seek to
play the module Battle for Moscow

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

To set up a game using the Vassal central server, follow the following procedure.

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 connect the clients to the central server.

    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 VASSAL Server

  6. Now click the Connect button connect

Only on client A

  1. Create a new room, with a meaning full name - say BFM, on the server and press Create.

  2. You know have a room, which other clients will join in, and where you will play the game.

  3. Still on the A client, start the game through the FileNew Game menu entry.

  4. Client A will be prompted to select a side

    Press Finish after selecting the side.

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

Only on client B

  1. In the server controls window, right click the room created by client A above - here BFM - and select Join Room

  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.

Setup for private server

As above, we assume two clients A and B, which wish to play the module Battle for Moscow

Furthermore, we will assume that both clients are on the same Local Area Network (LAN).

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

Note, both clients could be on the same machine. Also, if client A has a public facing IP address, then the clients need not be on the same LAN.

Only on client A

  1. We need to start our private server. Exactly how this is done depends on the host system.

    • linux Linux:
      1. Open a terminal and navigate to where you have Vassal installed - say /usr/share/vassal

        $ cd /usr/share/vassal 
        
      2. Start the server

        java -cp lib/Vengine.jar VASSAL.chat.node.Server -URL null
        
    • macosx MacOSX:
      1. Open a Terminal via FinderApplicationsUtilitiesTerminal, and navigate to where you have Vassal installed - say /Applications/VASSAL.app

        $ cd /Applications/VASSAL.app/Contents
        
      2. Start the server

        $ MacOS/jre/bin/java -cp Resources/Java/Vengine.jar VASSAL.chat.node.Server -URL null
        
    • windows Windows:
      1. Open a command prompt. To do that, press windows-R and type

        cmd
        

        in the pop-up dialog. You will be greeted by a black window with light-gray text and a command prompt

        C:\Users\foo> 
        

        where foo is your user name.

      2. Change directory to where you install Vassal - say C:\Program Files\VASSAL

        C:\Users\foo> cd C:\Program Files\VASSAL
        
      3. Run the server

        C:\Program Files\VASSAL> start jre\bin\javaw '-cp lib\Vengine.jar VASSAL.chat.node.Server -URL null'
        

    Our private server should now be up and running on client A with IP address 192.168.1.2 listening on port 5050.

On both clients

  1. Follow steps 1 through 4 above for the central Vassal server.

  2. Now right click the server button and select Private Server

  3. Click the server button and a new pop-up dialog will appear

    In this pop-up are 3 input fields

    • Description: A free-form string
    • Server IP Address: The IP address where the server is running. Above we started the server on client A with IP address 192.168.1.2, so we need to put 192.168.1.2 here.
    • Server Port Number: The port number on which the server is listening. Above, we used the default which is 5050, so we need to have 5050 here.

    Press OK once the settings have been set.

  4. Now click the Connect button connect

  5. Now follow steps 7 through 13 above, as for the central server.

2 Likes