Skip to content

Your first game

A new game starts in the setup wizard: six short steps that leave you with rules that check and a game you’ve already tried. This page follows it with tic-tac-toe.

Open a project from the Projects page and choose New game. Every step can be skipped with Skip setup, which opens the game’s Overview; you can pick the setup up again there with Continue setup.

Give the game a name, such as “Tic-tac-toe”, and choose the project it belongs to. Players see the name in the web player and in sign-in emails. Owners and developers can rename the game later, on its Settings tab.

Choice What you get
Import a rulebook AI reads your rulebook, a PDF or text file, drafts the rules, and lists what it had to guess for you to answer. It costs AI credits.
Start from an example A complete game to adapt: tic-tac-toe, Reversi, checkers, Kalah, Nine Men’s Morris, backgammon, chess or Hearts.
Start blank A small game that already plays, written from the basics you choose next, with a comment on every section.
Upload rules A rules file you already have, written in the rules DSL, up to 2 MB.

To follow along, choose Start from an example, then Tic-tac-toe.

An import costs 10 AI credits, or 20 for a rulebook over 60 pages; the choice shows the cost and how many credits your organization has before you start. The rulebook must be in English, a PDF or text file of up to 300 pages and 20 MB, and you confirm that you hold the rights to import it. It’s scanned for malware before it’s stored.

An import takes a few minutes and runs on its own, so you can leave and come back. It goes through five stages: an outline of the rulebook, writing the rules, checking them, playing smoke games on them, and handing them to your game.

When it finishes, its Questions list what the rulebook doesn’t settle. The rules already use one reading of each; answer any you want changed and choose Regenerate with my answers. Regenerating is included in the import’s price for 90 days. The first import becomes the game’s draft; a regeneration, or an import into a game that already has rules, arrives as a proposal you Accept or Reject on the AI tab. Your uploaded rulebook is kept, encrypted, for 90 days, and you can delete it sooner.

For a blank or example start, choose the fewest and most players, the board (a grid of squares, spaces joined by connections, or no board) and the turns (one at a time, or everyone at once). Continue writes the first draft. Uploaded and imported rules skip this step.

The checker reads the draft and lists any problems in plain words: where each one is (such as in the action “mark”) and what’s wrong. Each problem links to its line in the rules editor. The example has none, so you’ll see “No problems found.” You can also continue with problems and fix them later.

Play a few moves in the browser, against the search bot or yourself. Nothing is published yet: this is your draft, running in your browser.

The last step lists what comes next: refine the rules, playtest with bots, write a rulebook, and publish. The game’s Overview keeps the list until you dismiss it. Choose Finish.

Open the game’s Rules tab to see what the example gave you. Rules are written in the rules DSL: YAML for the game’s structure, with C#-like expressions in quotes. Tic-tac-toe’s rules start with the game, its seats and its board:

game:
id: tic-tac-toe
name: Tic-tac-toe
players: { min: 2, max: 2 }
seats:
topology: ring
names: [x, o] # seat 0 = X, who moves first
boards:
board:
kind: grid
size: [3, 3]
labels: { x: "abc", y: "123" }

The one move a player can make is an action. mark lets the player choose an empty cell, puts their mark there, and ends the game if that makes three in a row:

actions:
mark:
choose:
- at: { from: "board.cells()", where: "pieceAt(at) == null" }
effect:
- create: { type: mark, props: { owner: self }, into: at }
- if:
cond: "wins(self)"
then: [{ endGame: { winner: self, reason: three in a row } }]

wins is a function defined in the same file, and the turn structure under flow ends the game as a draw when nobody can move:

flow:
- phase: play
turns:
order: { from: "seat(x)", direction: clockwise }
budget: 1
actions: [mark]
onNoLegalAction:
- endGame: { draw: true, reason: board full }

The Rules DSL section covers the language in full.

The Rules tab has three pages:

  • Text: the rules file in an editor that colors, completes and documents the expressions, and checks the rules as you type.
  • Visual: the same rules as forms, for editing without the YAML. An edit on one page shows on the other.
  • Problems: what the checker found at the last save or check, and, apart, what it finds in your unsaved edits. Each problem links to its line.

Above every page are the draft’s revision, whether you have unsaved changes, the problem count, and Save, Check and Import rules file. Each save makes a new revision of the draft. If someone else saved since you opened the rules, your save is refused rather than overwriting theirs; reload to see their changes.

Try it: change size: [3, 3] to size: [4, 4] and the labels to "abcd" and "1234". The rules still check, but lines only looks at the first three cells of each row, so the game is now “three in a row on a 4 by 4 board”. Rules can be valid and still not be the game you meant, which is what playtesting is for.