examples/<purpose>/<name> in the monorepo. Most have a game worker package (the authored game) and either an app browser package (React UI), a cli Bun package (terminal), or both.
Looking up a specific package name, path, or
bun --filter command? See the Examples index — every shipped package with its path and run command in one table.Featured: Splendor
Splendor is the flagship end-to-end example — a Splendor-faithful 2–4 player tabletop with hosted multiplayer, hidden per-player state, three difficulty-tiered AI bots, a polished React 19 + Tailwind v4 + framer-motion table, and a deploy-readyapp/ package. Use it to see what a fully realized openturn game looks like and as the canonical thing to play and stress-test against.
- Hidden information — opponents’ reserved cards stay on the worker;
views.playerprojects them down to a count. - Variable seating —
MatchInput.minPlayerslets 2, 3, or 4 players seat through<Lobby>. - End-of-round triggers — first to 15 points flips a flag; the round completes before the winner is declared.
- Bots in the lobby — per-seat dropdown picks
Random,Greedy, orStrategicfrom thebots/package. - Cloud deploy —
bun run deployfrom the app dir builds the bundle, uploads the multiplayer Worker, and prints the openturn-cloud play URL.
Get started: Tic-tac-toe
Tic-tac-toe is the smallest end-to-end gamekit example and the one every tutorial walks through. Start here when learning openturn — it’s reused across the React UI, CLI, multiplayer, replay viewer, chat-plugin, and bot examples, so the samegame/ package shows up in every recipe.
End-to-end games
Complete, runnable games underexamples/games/.
Authoring with raw @openturn/core
Under examples/using-core/ — same games as their gamekit counterparts, written without gamekit.
Persistent player profiles
Underexamples/using-profiles/ — hydrate → play → commit → apply.
By concept
Each example is the canonical demo for one openturn concept.Run them
From the monorepo root. For the complete list of packages and commands (including library packages with nodev script), see the Examples index.
By tutorial
- Tic-tac-toe with gamekit walks the
tic-tac-toeexample end to end. Start here. - Tic-tac-toe multiplayer walks
tic-tac-toe-multiplayer. - Tic-tac-toe replay walks
tic-tac-toe-replay-viewer. - Tic-tac-toe with core walks
tic-tac-toe-core. - Tic-tac-toe with bots walks the
tic-tac-toe/botspackage and the bot-aware CLI.
By how-to
- Model hidden information uses battleship snippets.
- Handle simultaneous moves uses paper-scissors-rock.
- Handle randomness uses pig-dice.
- Add a CLI front-end covers the tic-tac-toe and pig-dice CLIs.
- Persist player state uses
persistent-wins(gamekit) andpersistent-wins-core.