The KAbalone Handbook
Prev |  | Next

# Chapter 3. Network Play

# 3.1. General Network Play

KAbalone supports playing across a network. This allows two people to play against each other on different computers, or one person to observe the game play of another KAbalone program. To use KAbalone's network features, KAbalone must be set to Network Mode by selecting Game->Network.

All running KAbalone programs which are in Network Mode broadcast changed positions to each other.

To exchange positions, the KAbalone programs have to be told about each other. If they are running on the same machine, nothing is needed (apart from switching to Network Mode). If running on different computers you have to specify the other's machine on the command line with the `-h` switch, as so:

     %kabalone -h SomeHostName

| For insiders: KAbalone, when in Network Mode, listens on a TCP socket for position change commands by other Abalone programs. You can specify the port number with the `-p` command line switch. You need this if you want to play two different Abalone Network games.

## 3.1.1. Examples

- Chris on machine1 and Mary on machine2 want to play against each other: Mary simply starts KAbalone, sets Options->Computer plays to None and switches to Network Mode. Chris starts KAbalone with

       %kabalone -h machine2

  and then does the same as Mary. Now one of the two can start the game and draw a red move. Each time the position is changed in one program, it automatically changes in the other one too.

- John wants to observe the game: He does the same as Chris, but doesn't draw a move himself.

- Two different KAbalone Network Games will run among machines m1 and m2. To distinguish the games, we choose port number 12345 for one. On m1 we start as usual:

       %kabalone

  for the first game, and (not so usual):

       %kabalone -p 12345

  for the second. On m2 we start the first game with:

       %kabalone -h m1

  and the second with:

       %kabalone -h  m1:12345

  (The colon separates host and port as in a URL).

Prev | Home | Next
Rules of the Game |  | Advanced Options