Prerequisites
- Bun 1.3 or newer. Openturn uses Bun as the package manager and for every script. Install from bun.sh.
- Node 20 or newer is not required, but some IDEs still expect it for TypeScript language services.
- Chromium-based browser for the React apps. The examples use Vite, which outputs modern ESM.
Clone and install
Scaffold a new project
If you only want to author your own game (rather than read the example monorepo), use the CLI to scaffold a fresh project anywhere on disk:openturn create writes a small project. Three of the files are openturn-specific:
app/game.ts— your authored game (state, moves, views).app/page.tsx— the React entry point.app/openturn.ts— metadata read by the CLI and the deploy pipeline.
package.json and tsconfig.json are conventional TypeScript plumbing.
The local template gives you a single-device React app; --template multiplayer gives you the cloud-ready variant. See your first game for what these files mean.
Run the example apps
All examples live underexamples/* in the monorepo. Each has one or more of: a game worker package, an app browser package, and a cli Bun package.
Open the logged URL in your browser and play. If you are learning openturn, start with the tic-tac-toe React app — it’s the smallest end-to-end gamekit example and the one every tutorial walks through. To see what a fully realized game looks like (hosted multiplayer, hidden state, lobby with bots, polished tabletop UI), open additional tabs against the Splendor app for 2–4 player play.
What to read next
- Your first game builds a game from scratch in ten minutes.
- Tutorial: tic-tac-toe with gamekit walks through the example you just ran.
- Mental model explains the authoring contract the engine relies on.