MultiPlayer Setup

Listing Games

client:

LIST GAMES

server:

1:Mike's Game RULEZ:8:10:1:3:20000:0
2:GREEN RooM:1:13:1:3:20000:1
END LIST

The server response is of the format “game ID:game name:current slots used:max slots:terrain type:rounds:starting cash:game started”. If no games are available, the server just returns END LIST.

Creating Games

client:

CREATE GAME
Blue room:10
END CREATE

server:

CREATE SUCCESS
8
END CREATE

Where the number 8 is the id of the game just created.

Joining Games

client:

JOIN GAME
2:MikeKILLA:blue:tank3
END JOIN

server:

JOIN SUCCESS

The client command is of the format “game ID to join:player name:tank color:tank model”. Not sure what options are really needed after the player name.

Listing Players

client:

LIST PLAYERS
2
END LIST

Where 2 is the game ID. server:

1:Mike:blue:tank3:0
2:sitzmar:green:tank6:1
END LIST

The server response is of the format “player ID:player name:tank color:tank model:ready status”. Ready is 1, not ready is 0. Not sure what options are needed for tank stuff.

Get Tank Info

client:

LIST TANKS

server:

1:234:343:90:45:0
2:32:454:63:70:1
END LIST

player id:x:y:power:angle:fire

Set Tank Info

client:

TANKS
1:234:342:84:84
2:43:343:48:48
END TANKS

player id:x:y:power:angle

Starting Game

client:

START GAME
LANDFORM
15:17:19:... as byte values
END LANDFORM
END START GAME

server (to all other clients):

START
LANDFORM
15:17:19:... as byte values
END LANDFORM
END START

The server response is of the format “short,short,short”. Where each short represents one value in the landform array.

Ready Status

client:

READY:1

0 is “not ready”, 1 is “ready”

Player Move

client:

FIRE

server:


Pre-Game

  • Client –> Server
    1. Join (nickname, tank color, tank graphic)
    2. Ready/Not Ready
    3. Start game
  • Server –> Client
    1. overly elaborate diagram goes here

Start Game

  • Game Host Clicks Start
  • Server –> All clients
    1. Player Information
  • Host –> server
    1. Host Generates landform
  • Server –> All clients
    1. landform
    2. player locations
  • Send Player 1 its your turn

In-Game

  • Client –> Server
    1. Current angle
    2. Move (Angle, Power, Weapon)
  • Server –> Client
    1. Prompt for move
    2. Active player's angle (realtime)
    3. Active player's move (Angle, Power, Weapon)
 
client_server_protocol.txt · Last modified: 2006/10/08 12:56 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki