NetAcquire Protocol Reference

This document provides detailed specifications of the NetAcquire program's communication protocol. This information can be used to write alternate Acquire playing programs that are compatible with NetAcquire. This includes both end-user programs and bots that are written to automatically play the game.

Table of Contents

  1. About This Document
  2. Communication Protocol
    1. General Format
    2. Handshake
    3. Common Parameters
      1. Chain-ID
      2. Client-State-ID
      3. End-Game-Flag
      4. Game-Status-ID
      5. Message-Text
      6. Rack-Tile
      7. Tile-ID
      8. Tile-State
      9. Version-ID
    4. Host-Processed Directives
      1. BM - Broadcast Message
      2. CL - Close Client
      3. CS - Chain Selected
      4. GS - Game State
      5. JG - Join Game
      6. LG - List Games
      7. LU - List Users
      8. LV - Leave Game
      9. MD - Merger Disposition
      10. P - Purchase
      11. PG - Start Game Play
      12. PI - Ping (host)
      13. PL - Add Player
      14. PR - Ping Response (host)
      15. PT - Play Tile
      16. SG - Start Game
    5. Client-Processed Directives
      1. AT - Activate Tile
      2. GC - Get Chain
      3. GD - Get Disposition
      4. GM - Game Message
      5. GP - Get Purchase
      6. GT - Get Tile
      7. LM - Lobby Message
      8. M - Client Message
      9. PI - Ping (client)
      10. PR - Ping Response (client)
      11. SB - Set Board Status
      12. SP - Start Player
      13. SS - Set State
      14. SV - Set Value
  3. Document History
  4. Suggestions for Improvement

About This Document

This document was originally compiled by Kensit (lornic at telus dot net). Any inquiries about the protocol structure or general contents of this document should go to him. In the process of making a compatible client, this document was updated, prettied and fleshed out by Nolan Waite (nolan at nwaite dot com). Any inquiries about the look of the document—typos, formatting issues and so on—should go to him.

Various editions of the board game Acquire have labeled hotel chains with various names. All known names are listed throughout this document. Names treated similarly should be considered identical by various clients (i.e. Luxor and Sackson are always the same chain).

Communication Protocol

This section defines how NetAcquire communicates and provides information on writing alternate programs that may use that protocol.

All communication between NetAcquire clients and hosts is handled via strings of data containing sets of "Directives". A directive is a single activity for NetAcquire to process. All strings are ASCII-encoded. The last character of a string of data is always a colon.

Directives conform to a General Format and are broken into Host-Processed Directives and Client-Processed Directives. Common Parameters define those parameters that have a single definition common to all uses.

Multiple directives can be sent within single blocks of data (e.g. SS;4;:SB;99,0;:). They will be separated by the string ";:".

General Format

All directives are formatted:

Directive-Code;Parameter-String;:

Where:

Each directive specification notes the directive's purpose, format and notes on its values or use.

Connection Handshake

To connect to a Netacquire server, the host should send a SP - Start Player directive to the client immediately upon accepting an incoming connection. The client should respond with a PL - Add Player directive to the server. The server should then send a SS - Set State directive with the Client-State-ID of 3. The server can send some lobby messages indicating the current status of the server: number of users, number of games, etc.

Common Parameters

Chain-ID

Numeric code used to identify a hotel chain. The value used is the hexadecimal RGB specification of a hotel chain's color converted to decimal.

The numeric codes used as Chain-ID
Chain Color, RGB hex value Numeric code
Special IDs
None (not in hotel) gray, C0C0C0 0 or 12632256
Discarded (unplayable rack tile) gray, 808080 8421504
Hotel IDs
Luxor/Sackson red, 0000FF 255
Tower/Zeta yellow, 00FFFF 65535
American/America blue, FF0000 16711680
Festival/Fusion green, 00FF00 65280
Worldwide/Hydra brown, 004080 16512
Continental/Quantum cyan, FFFF00 16776960
Imperial/Phoenix pink, C0C0FF 12632319

Client-State-ID

Numeric code used to announce to a client what state they are now entering.

The numeric codes used as Client-State-ID
Numeric code State
3 Connected to server.
4 Entering game

End-Game-Flag

0 if game should not end; 1 if game should end. (See P - Purchase directive.)

Unknown values. (See GP - Get Purchase directive.)

Game-Status-ID

Numeric code used to identify the current state of a game.

The numeric codes used as Game-Status-ID
Numeric code State
0 Awaiting Player Action
1 Awaiting Players (to join new game)
2 Next Turn
3 Play Tile
4 Form Chain
5 Choose Merger Survivor
6 Merger Bonuses
7 Choose Merge Chain
8 Get Merger Disposition
9 Merger Disposition
10 Merger End
11 Purchase
12 Draw Tile (for player)
13 Start Round
99 End Of Game

Message-Text

ASCII text string of a user-typed message, enclosed in double quotes. Any double quotes within the message must be escaped by doubling up.

Rack-Tile

Index number identifying the entry on a player's table of held tiles, from 1-6.

Tile-ID

Integer value of a tile on the board. Tiles in column 1 (1A, 1B, etc.) are tiles 1-9; column 2, 10-18; column 3, 19-27; column 4, 28-36; column 5, 37-45; column 6, 46-54; column 7, 55-63; column 8, 64-72; column 9, 73-81; column 10, 82-90; column 11, 91-99; column 12, 100-108.

Tile-State

Integer value representing current state of the tile. Is 0 if tile is not in hotel, 12648384 if player can make a hotel with the tile, and otherwise takes on a Chain-ID to indicate the hotel it is part of.

Version-ID

Series of three parameters related to the version number. For example, "version 2.0.3" becomes the three parameters "2", "0", "3".

Host-Processed Directives

Directives sent from a client to a host, to be processed by the host.

BM - Broadcast Message

CL - Close Client

CS - Chain Selected

GS - Game State

JG - Join Game

LG - List Games

LU - List Users

LV - Leave Game

MD - Merger Disposition

P - Purchase

PG - Start Game Play

PI - Ping (host)

PL - Add Player

PR - Ping Response (host)

PT - Play Tile

SG - Start Game

Client-Processed Directives

Directives sent from a host to a client, to be processed by the client.

AT - Activate Tile

GC - Get Chain

GD - Get Disposition

GM - Game Message

GP - Get Purchase

GT - Get Tile

LM - Lobby Message

M - Client Message

PI - Ping (client)

PR - Ping Response (client)

SB - Set Board Status

SP - Start Player

SS - Set State

SV - Set Value

Document History

Suggestions for Improvement