Games Reference
All eight games
Every game shares the same session and result contract. What differs is match size, supported match types, and the extra fields attached to result.groups[].finalState.
| game value | Players | Match types | Bots | Notes |
|---|---|---|---|---|
chess | 2 | matchmaking, private, bot, hosted | Yes | Full PGN + FEN history, clocks, AFK forfeiture. |
checkers | 2 | matchmaking, private, bot, hosted | Yes | Forced captures, multi-jump, king promotion. |
connect4 | 2 | matchmaking, private, bot, hosted | Yes | Standard 7×6 board. |
tictactoe | 2 | matchmaking, private, bot, hosted | Yes | 3×3 board. |
pool | 2 | matchmaking, private, hosted | Yes (client-side physics bot) | 8-ball rules; physics resolved on the client, outcome reported to the server. |
chkobe | 2–4 | matchmaking, private, hosted | Yes (heuristic) | Fast-paced shedding card game, standard 52 + jokers. |
archery | 2–8 | matchmaking, private, hosted | No | Turn-based target archery across multiple sets, with wind and hand tremor. |
subway-runner | 1 | bot only | — | Single-player endless runner; "bot" here simply means "solo session". |
ludo has a working real-time engine and socket handlers, and reserves a GameType value and a Supabase table, but it is not yet accepted by POST /v1/sessions — creating a session with "game": "ludo" currently returns a 400. Treat it as reserved, not released.Result reasons
checkmateChess — a king is checkmated.resignationA player resigned mid-game.timeoutA player's clock (chess) or turn timer ran out.disconnectA player failed to reconnect within the grace window.drawAgreed draw, stalemate, or a game-specific move limit reached.collisionSubway Runner — the runner hit an obstacle, ending the run.game_overGeneral terminal state — board filled, target cleared, or match limit reached.Result envelope
Every ended session's result object follows one shape, whatever the game:
GameResult
{
"reason": "checkmate",
"duration": 692, // seconds
"winnerGroupId": "g_1", // absent on a draw
"groups": [
{ "id": "g_1", "players": [ /* … */ ], "won": true },
{ "id": "g_2", "players": [ /* … */ ], "won": false }
],
"finalState": { /* game-specific snapshot, see each game below */ }
}Chess additionally retains legacy top-level winner, pgn, and fen fields for backward compatibility with the original single-table schema.
Chess
game: "chess"
Classic two-player chess with running clocks, castling, promotion, and AFK forfeiture.
Result fields
pgn | string | Full PGN notation of the game. |
moveCount | number | Total half-moves (plies) played. |
Moves are exchanged over the socket in UCI notation (e.g. e2e4, e7e8q for promotion). An idle player receives an AFK warning at 60 seconds and is forfeited at 90.
Checkers
game: "checkers"
Forced captures, multi-jump sequences, and king promotion on reaching the back row.
Result fields
moveCount | number | Total moves played across both players. |
A draw is recorded once the move-limit (200 moves) is reached without a capture-forced resolution.
Connect 4
game: "connect4"
Standard 7-column, 6-row drop board. First to connect four in any direction wins.
Result fields
moveCount | number | Total column drops made. |
Tic-Tac-Toe
game: "tictactoe"
The 3×3 classic. Lightweight enough to use as a demo or onboarding game.
No extra result fields beyond the shared envelope.
Pool
game: "pool"
8-ball rules. Groups (red / yellow) are assigned on the first legal pot; the black is only playable once a player has cleared their group.
How it's scored
Shot physics resolve on the client; the client reports the outcome of each turn (balls pocketed, fouls, first contact) back to the server, which validates and applies it. A foul on the black (potting it before clearing your group) ends the match in your opponent's favour; potting the cue ball is always a foul and grants ball-in-hand.
scores | [number, number] | Balls legally pocketed per player. |
playerGroups | [string|null, string|null] | Assigned ball colour per player once groups are decided. |
Chkobe
game: "chkobe"
A fast shedding card game for 2–4 players, played with a standard 52-card deck plus jokers. First to empty their hand wins.
House rules in play
| Starting hand | 7 cards |
| Draw on no legal play | 1 card |
| Win condition | First to empty hand |
| Turn direction | Clockwise |
7 | Next player draws 2 |
A | Skips the next player |
J | Changes the active suit (wild) |
JOKER | Wild; next player draws 4 |
Card weights used internally for bot heuristics and future rating math: Joker 40, Ace 11, Jack 20, Ten 10, King 2, Two 2, all others 1.
Archery
game: "archery"
Turn-based target archery for 2–8 players. Two sets of three arrows each, at a simulated 70-metre distance, with optional wind drift and hand tremor.
Scoring rings
| X / inner-10 | 10 |
| 9 – 1 | Matches ring label |
| Miss (outside all rings) | 0 |
Wind (up to 5 m/s) can change direction each set, and a small hand-tremor amplitude is applied to every shot — both configurable per deployment, both default to enabled.
Subway Runner
game: "subway-runner"
Single-player endless runner. Created with matchType: "bot" — there's no opponent, "bot" simply denotes a solo session in the shared contract.
Result fields
score | number | Coins × active multiplier, plus a distance bonus. |
distance | number | Metres run before the run ended. |
coins | number | Total coins collected. |
Power-ups
🪙 Coin
Instant +50 score.
🧲 Magnet
Auto-collects nearby coins for a duration.
🛡 Shield
Absorbs one collision.
⏱ Slow motion
Temporarily reduces obstacle speed.
⬆ Jump boost
Increases jump height for a duration.
✕2 Score multiplier
Multiplies coin value for a duration.
Physics map variants
Six physics presets exist for tournament or seasonal variety — standard, moon, heavy_gravity, underwater, space_station, and wind_tunnel — each altering gravity, air resistance, and jump feel while reusing the same kinematics.
Ludo not yet released
game: "ludo" — reserved
The engine, rules, and socket handlers exist and are functional, but POST /v1/sessions does not yet accept ludo as a valid game. Included here so integrators aren't surprised by the reserved type name.
| Tokens per player | 4 |
| Main path length | 52 squares |
| Home straight | 5 squares |
| Consecutive sixes allowed | 3, then turn passes |
| Six grants extra roll | Yes |
| Capture grants extra roll | Yes |