quest'n'click 4.5.0 · r1

Built for quest'n'click 4.5.0, revision r1. Whether it is published, and which one is current, is recorded at publication.json.

The storyboard, source of truth

Français · Type: explanation + how-to · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.2.5

storyboard.json holds the script of a game: one board per room, one panel per beat, who says what, the player action that triggers each beat, the sounds, and the hints. The method says the storyboard is the source of truth for every text, and the rooms are written from it. The engine, though, never reads it. This page explains what that choice gives, where the storyboard and the game can drift apart, and how to keep them in step.

Story first, as data

Write the story as a storyboard before any room file: boards (one per room), panels (one per beat), lines (who says what), the player action that triggers each beat, the sounds, and the hints the helper voice gives when the player is stuck. The file is games/<id>/storyboard.json in the engine repository, game/storyboard.json in a created project. The code is derived from the storyboard, never the other way round.

Before writing, answer the four questions of Story first (premise, want, obstacle per room, ending) and read Puzzle design: what makes a good room, puzzle, hint chain and fallback in this engine. In the engine repository, Claude Code has a /storyboard skill (.claude/skills/) that writes the file with you; it is not shipped to a created project.

Why a storyboard, and why it is the source of truth

Where the storyboard and the game drift apart

The game runs from the rooms (rooms/*.ts, cast.ts, rules.ts…), not from storyboard.json. Nothing copies a line from one to the other automatically. So they can differ, in three ways:

  1. The rooms changed, the storyboard did not. A line rewritten in the Studio's Rooms tab (it edits the string in the room file) or by hand stays old in the storyboard.
  2. The storyboard changed, the rooms did not. A panel added after the room was written is not in the game until someone writes it.
  3. Two editors of the same file. In the local Studio, the Storyboard tab keeps every edit in memory until Save, which writes the whole document. When storyboard.json changes on disk meanwhile (an AI, an editor, git), a banner offers to reload; with unsaved edits it warns that saving would overwrite that change. On a hosted Studio the storyboard belongs to the span story ("story and storyboard"): a member editing it holds its lease, and another member's save is refused with a 423 (span locked), or with a 409 when the file changed since they read it (stale base).

Coverage measures the first two. It checks the saved storyboard against the content: each board's room, each speaker, line, topic, sound and panel action is ok (found), partial (the pieces exist but not the whole: the entities but no rule, a close line, a character not in that room), missing (the game has nothing of it) or unknown (prose the checker cannot read). The same check feeds the Studio's badges on each board and panel ("✓ everything is in the game", "~" partly, "✗" missing), the Storyboard coverage panel of the Check tab, the MCP tool storyboard_coverage, and npm run page:storyboard.

Guarantee · storyboard-coverage-reports-missing · referenced · executed on aff6caab7514 · scope self-checked by the author (AI), not reviewed A panel whose room, speaker, line or sound the game lacks is reported missing, not marked as in the game.

Limit · coverage-is-textual Coverage compares text and ids; it does not play the game. A panel's action is matched against the rules as prose ("Open Grandpa's armchair"), so a free wording can stay unknown. A line the game has but reworded beyond "close" is missing. Coverage says what to look at; the solver and the playtests say whether the game works.

Write it as the storyboard

The schema is tools/pages/storyboard-schema.md. The habits that make it useful:

A storyboard that is not valid (a board without an id, panels that are not a list, a line of the wrong kind) is refused with the same sentences by the page generator, the Studio's server, its in-browser demo and set_storyboard. The Studio's Save also refuses duplicate or empty panel ids.

Keep the storyboard and the game in step

In the engine repository (games/<id>/) or the created project (game/), on your machine.

  1. Write or change the storyboard first: by hand, in the Studio's Storyboard tab, or with an assistant (set_storyboard). Review it on a page until the author says it is final.
  1. Write the rooms from it: copy the lines, topics and hints into the room files (Rooms).
  1. Check coverage. Open the Studio (npm run studio, in either context) and read the badges and the Check tab's Storyboard coverage, or, in the engine repository, run:

    # in the engine repository
    npm run page:storyboard
    
  1. Fix each gap on the side that is wrong. When the game is right (a better line found while writing), copy it back into the storyboard, so the storyboard stays the reference for translators and voice actors. When the storyboard is right, write the missing panel into the room.
  1. Commit both together. The Studio's undo does not cover storyboard saves: git is the history of storyboard.json.

Alternatives set aside

Trade-offs

Two copies of every line, kept in step by discipline and measured by coverage. It costs a pass after each change; in return the story stays reviewable on its own, at any moment, by someone who does not read code. For a very small game written in one sitting the storyboard can stay rough; it is worth its upkeep as soon as several people, several languages or voices are involved.

Decisions and references


Edit the source of this page · Report an error