Game Flow

Classic games come in two shapes. Knowing which one you're integrating tells you how many /game/play calls a round takes and whether you need to resume state.

Single-Action Games

One request = one complete round. The client sends a bet, the RGS debits, runs the math, credits any win, and closes the round — all in a single /game/play call.

Games: Dice, Limbo, Plinko, Keno, Wheel, Baccarat.

There is nothing to resume — the round is already closed when you get the response. The Result.metadata.balance is the post-credit balance to display.

Multi-Action Games

A round spans several /game/play calls. A start opens the round and debits the wager; later actions (reveal, next, flip, hit, cashout, …) advance it; the round closes when the player busts or cashes out. Some games also offer an instant variant that plays a full round in one call.

Games: Mines, Blackjack, Hilo, Towers.

Key rules:

  • Pass roundId (from the start response, or from /game/current) on every follow-up action.
  • result is present only when the round settles. Mid-round responses carry the updated state and an absent/empty result; the terminal response (bust or cashout) carries the result with the final payout.
  • state reflects the round after each action — render from it. While the round is active, sensitive fields are hidden (e.g. Mines won't reveal mine positions until you bust or cash out).
  • Some actions debit again. In Blackjack, double/split debit another wager and insurance debits half. Account for these in your client-side balance — don't expect metadata.balance to report it (see below).
  • Only one open round per player + game at a time. Starting a new round while one is open is rejected (active_round_exists) — resume or finish the existing one first.

Don't read metadata.balance on multi-action responses. To keep intermediate actions fast, the RGS skips the operator wallet lookup on these calls, so metadata.balance comes back as 0 — it is not the player's real balance. The client must track balance itself: fetch the authoritative value from the standalone GET /game/balance endpoint, and/or keep a client-side running balance that you adjust locally as the round debits and credits.

Provably-Fair Inputs

Outcomes for both shapes are derived from the active seed pair (server seed + client seed + nonce). The nonce increments per round, so successive bets on the same pair are independent and verifiable. See Provably Fair.