Skip to main content
Gameplay messages carry gameType and tableId in the envelope and game-specific data in the payload. The core protocol routes these messages without inspecting the payload.

Turn-Based Messages

Used by sequential games (poker, blackjack) where one player acts at a time.

game_action_request

Direction: Server → Client (unicast) Sent when it’s this player’s turn. The client MUST respond with submit_action within timeoutSeconds.
Every game_action_request payload MUST include an availableActions field. This is an explicit enumeration of the valid actions the client may take in the current state, including the action type and any required/optional parameters.
timeoutSeconds is enforced by the server’s clock. The client’s local clock is informational only. Budget at least 20% of the timeout for network round-trip.
If the client does not respond within timeoutSeconds, the server applies the default timeout action defined in the game specification (e.g., fold in poker, stand in blackjack).

submit_action

Direction: Client → Server
Clients MUST NOT send submit_action for a turn-based game except in response to game_action_request. Servers MUST reject unsolicited actions with NOT_YOUR_TURN.

game_state_update

Direction: Server → All clients at the table Broadcast when game state changes (cards dealt, community cards revealed, new phase, etc.).

player_action_broadcast

Direction: Server → All clients at the table Broadcast after a player’s action is processed.

round_result

Direction: Server → All clients at the table

game_error

Direction: Server → Client

Phase-Based Messages

Used by simultaneous-action games (roulette, baccarat) where all players act within a time window. Phase-based games reuse game_state_update, round_result, and game_error from the turn-based set.

betting_window_open

Direction: Server → All clients
Clients MAY submit multiple submit_action messages during an open window (e.g., placing multiple roulette bets). Servers MUST reject actions received after betting_window_closed.

betting_window_closed

Direction: Server → All clients
After the window closes, the server resolves the round and broadcasts round_result.

Client State Machine

For turn-based games:
For phase-based games:

Multi-Table Play

When playing multiple concurrent games (requires capabilities.multiTable: true):
  1. Each incoming request includes gameType and tableId
  2. The client correlates the request to the correct game context
  3. The client’s response MUST include matching gameType and tableId
  4. Independent state machines are maintained per table
  5. Timeouts on one table are independent of actions on another