You can launch the game from the [You must login to view link] providing the game's player configuration parameters. This is useful to set up a game in the following scenarios:
  • LAN (Local Area Network), i.e. private network
  • Over the internet without a lobby
  • For games with 2 or 3 players, players can be assigned at will to any color without a specific order, i.e. the typical game room joining order in the lobby. However, the green ants must always be present (game host). For example, with two players it is allowed to play with green/blue ants or green/black pairs.

However, starting a game from the command line, i.e. without the lobby, means that you still have to forward port 4001 TCP in order to play online. This is not required for a LAN game though.

The generic command line setup is as follows:
ants.exe /p0<IP> /n0<name> /p1<IP> /n1<name> /p2<IP> /n2<name> /p3<IP> /n3<name> /spike /<n>

Each parameter has the following meaning:
  • /p0 - green IP; replace <IP> accordingly; no spaces between the parameter and the IP
  • /n0 - green name to show in the game; replace <name> accordingly; no spaces between this parameter and the name
  • /p1 - idem for red
  • /n1 - idem for red
  • /p2 - idem for blue
  • /n2 - idem for blue
  • /p3 - idem for black
  • /n3 - idem for black
  • /<n> - replace <n> with the total number of players expected; no spaces between the slash and the number

  • For games with less than 4 players, leave out the respective parameters
  • As mentioned above, you can assign the colors as you wish, i.e. it is allowed to leave out, for instance, the parameters 1 and 4 and keeping 0 and 2 for a game between green and blue ants.
  • If you are not the game host, add the switch /h before /p0. Example:
    ants.exe /h /p0192.168.1.65 /n0Lima ...
  • Most importantly and above all, besides forwarding the port, if you are behind a router you should provide your localhost IP in the respective parameter. The following example ilustrates this, where Lima is playing with black ants and Foo is the host. The command line parameters for Lima are the following.
    ants.exe /h /p0<Foo public IP> /n0Foo /p3<192.168.x.x> /n3Lima /spike /2
    192.168.x.x is a typical LAN IP. You can find your localhost IP by typing the following in the command line to list all the available network interfaces:
    ipconfig /all
    Locate your Ethernet adapter, the one you use to connect to the Internet, and you can find the IP labeled as 'IPv4 address'.

I remember I wrote years ago a tool to automatically generate a script to launch the game given user's input for player names and IPs. I can do it so again if you request it.

Leave any questions below.

Enjoy! :)