Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.27 KB

MULTIPLAYER.md

File metadata and controls

35 lines (24 loc) · 1.27 KB

Flight Club

Multiplayer Play

NOTE: THIS IS A DRAFT!

Starting A Game Server

Command-line arguments from startup/XCFrame.java:

XCFrame [task] [pilot_type] [host:port] [pgs hgs sps bls]

All the parameters are optional. If none are passed in the game loads defaults as follows:

  • task = default
  • pilot_type = 1 (hg)
  • host:port = null (ie. single player mode)
  • pgs = 2, hgs = 4, sps = 2 (the numbers of each type of AI glider)

The last two parameters are mutually exclusive. Either we connect to a game server or we create a number of AI gliders.

Server Commands

Commands from server/XCGameServer.java:

  • QUIT: break;
  • TEST: client sends "+OK" and flush()
  • KILLALL: sends disconnectAllXCClient()
  • LAUNCH: not sure... starts the game?
  • WARM_FRONT: secret code to shut down the server

Any other command is just "mirrored" to the other player's consoles, with your ID preprended (I think).