Repository navigation
EN Create Principles
Français · Type: explanation · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.3.0
Why a quest'n'click game is written as data, why its geometry lives in a separate file, and why everything a save remembers carries a stable id.
This page and the other "Create a game" pages are for whoever writes the story: the rooms, the lines, the puzzles.
They describe the format the engine reads. You never need to touch the engine (src/engine/): the whole game lives in
one folder, games/<id>/ in the engine repository, game/ in a project made with quest-n-click create
(layout of both).
The full types, with their comments, are in src/engine/core/types.ts, which
re-exports the files of src/engine/core/types/ (split by subject in 4.1.0). Your editor offers them as autocomplete.
The generated DSL reference lists every command and condition.
These pages replace the old docs/en/CONTENT_GUIDE.md, split by question. Since the 4.5 switch-over, that old file is
a transition page: it keeps every old anchor, each old heading links to its new destinations here, and a fallback link
to blob/v4.4.0/docs/en/CONTENT_GUIDE.md always works.
-
Content, not code. The content is made of data: objects, lists, texts. No functions. That is what lets the
engine check the game on its own (
npm run validate) and prove it can be finished (npm run solve). -
Logic on one side, geometry on the other. You write what happens in
rooms/<room>.ts. Where things are (clickable rectangles, character positions, the walkable area) lives inlayout/<room>.json, placed with the mouse in the placement editor (npm run dev, then?edit=<room>) or in the Studio. You never type coordinates by hand, except for a one-off scripted move (geometry). - Nothing is a dead end. Every action gets a response. With no written reaction, the engine answers with the game's fallback responses (reactions).
- Logical coordinates. A backdrop measures 640 × 400, origin top-left. A character is placed by its feet.
Limit ·
custom-code-is-code"No functions" holds for the content. What a game really needs beyond the DSL, a custom command or a minigame, is TypeScript of its own beside the content, named in the game and declaring its effects (custom code).
New games set schemaVersion: 3 in game.ts (the template does). Anything whose execution position survives in a
save has an explicit, unique id: every Rule, TalkTopic, Choice, EventRule, and every once, nth, cycle or
random block. A ScriptDef already has an id and adds one stepIds entry per top-level command. The validator
rejects a v3 game with a missing or duplicate id (… requires a stable "id" in schema v3,
duplicate stable id "…", schema v3 script needs one stable step id per command). Reordering content or
translating a text therefore does not change the meaning of a save.
schemaVersion: 3,
// …
{ id: 'open.pantry', verb: 'open', a: 'pantry', do: […] }
{ id: 'ask.key', topic: 'Where is the key?', do: […] }
{ once: […], id: 'arrival.first' }
{ id: 'clock', stepIds: ['wait', 'chime'], do: [{ wait: 1000 }, { sfx: 'chime' }] }Lines can carry ids too ({ say: [...], id }, { id, text } in a list): translations and voice clips then follow the
id, not the line's position (npm run ids -- --lines).
npm run ids -- --write --map writes those ids into an existing game, with the migration step its saves need; how
to rename an id later without breaking saves is on state and saves.
compileGame(source) (src/engine/core/define.ts) clones and normalises the
authoring source once; a v3 result is frozen, so a tool that tries to change it fails at once. The engine, the
validator, the solver, the replay and the puzzle tools all consume that same compiled representation. Read the
v2 → v3 upgrade notes before converting an existing game.
Limit ·
ids-not-renamesStable ids protect a save against reordering and translation. They do not protect it against a rename: changing an id is a change of meaning, which needs a migration step (migrationsingame.ts).
A game has to be checked, saved, translated, compared between two revisions, edited by the Studio and an assistant, and proved finishable by a machine. A function inside the content can do none of that: no tool can read what it does without running it. Data can be read by all of them. The solver even runs the real engine on that data, so what it proves, a player can do (what the solver proves).
Geometry is apart because it is edited differently (with the mouse, against the picture) and changes for different reasons (a new backdrop moves every rectangle, not a single rule).
- Scripts in a general-purpose language (callbacks in the content): flexible, but the validator, the solver, the Studio and the translation tools would lose sight of the game.
-
Ids by position (the schema 2 rule: a topic is
<room>.<actor>.<index>): no work for the author, but inserting a topic or translating a text shifted what an old save meant. Schema 3 made the ids explicit.
Some ideas take a custom command instead of three lines of code, and the DSL grows slowly, one primitive per real
need. Writing ids is extra work; npm run ids -- --write does most of it.
- ADR 0002, content is data; the code a game needs is trusted and named
- ADR 0003, the solver runs the real engine
- ADR 0026, saves across revisions
- Source:
src/engine/core/content-ids.ts(the stable ids),src/engine/core/define.ts(compileGame).
Generated publication · publication générée — current documentation · documentation courante: quest'n'click 4.4.0 r1, documentation revision · révision de la documentation 8dc717c69acb62c4742b69c54a7e7dfb620f75d8.
Earlier versions and permalinks · versions précédentes et liens permanents: https://wanoo.github.io/quest-n-click/docs/
An edit made in this wiki is overwritten at the next publication · une modification faite dans ce wiki est écrasée à la publication suivante.
Edit the source · Modifier la source · Report an error · Signaler une erreur
Index (6)
Start (6)
Play (9)
Install (17)
- Requirements
- Install from the release archive
- Install from npm, once published
- Install from the repository to work on the engine
- doctor: checking your machine
- Image toolchain
- Audio toolchain: ffmpeg, fluidsynth, Furnace, uv
- Upgrade
- Upgrade notes: 4.4
- Upgrade notes: 4.3
- Upgrade notes: 4.2
- Upgrade notes: 4.1
- Upgrade notes: v3
- Upgrade notes: v2 to v3
- Coming from web-scumm
- Package reference
- Install troubleshooting
Create a game (55)
- Your first game
- Layout of a created project and of the engine repository
- The working loop
- Content principles and the identity contract
- Rooms
- Geometry: placement, walk zones, masks, layers, camera
- Something is visible but unreachable
- Reactions
- Game commands
- Conditions
- Flags, variables and events: which to use
- Custom code
- Characters
- Items and inventory
- World map
- Dialogues
- Scripts and events
- Moving characters: patrols and walks
- Exits
- Chapters and objectives
- State and saves: persistent or temporary, renaming an id, migrations
- Staging: wide rooms and animations
- The stage: lights, particles, floors
- Skin and fonts
- Title and credits
- Heroes: several characters and hero choice
- Built-in minigames
- A custom minigame
- Translations
- Music in stems
- Sound effects
- Voices: per language and per hero
- Images: prompts, cutting sheets, transparency, scale
- Asset provenance
- The storyboard, source of truth
- Puzzle design
- Classic mechanics
- Review pages
- DSL reference
- Checking your game
- What the solver proves
- Solver options
- Playtests
- Remix
- Speedrun for authors
- The sealed ending
- Production template
- Example games
- Working with an AI
- Build and release a game
- Publish on GitHub Pages
- The static game on Clever Cloud
- Other static hosts
- Sub-path, cache and service worker, incomplete deploys, going back
- Testing on a phone over the LAN
Local Studio (24)
- The local Studio: overview and launch
- Edit a room
- Placement and stage
- Preview, apply, undo
- Storyboard
- Assets and cutting
- Check: validator, solver, critical path, heat, health, coverage
- Before and after captures
- Semantic diff
- Play and replay a session
- Rule explainer
- Language and objectives
- Voices and the heroes × languages matrix
- Map
- Notes
- Remix in the Studio
- Music
- The Assistant: bring your own key
- Demo mode and studio-apply
- Local and LAN security
- Studio API
- Local MCP: setting up each client
- MCP tools
- Studio troubleshooting
Team Studio (21)
- What runs where
- Concepts: revision, transaction, span, lease, preview, build
- Starting as an invited dev
- Working together day to day
- Roles and actions: the full matrix
- Invitations
- Managing members
- Write refused on the hosted Studio: stale base revision (409)
- Write refused on the hosted Studio: span locked (423)
- Recovering after a lost lease, a disconnection or a stale preview
- Comments
- Map and semantic diff
- Publishing builds
- Remote MCP
- The game in Git
- Upgrading the engine of a hosted game
- Hosted assets
- The server's command line
- Health and metrics routes
- Trying it locally with compose.yml
- Known limits
Clever Cloud (23)
- Clever Cloud: overview, cost and prerequisites
- Apps and add-ons
- Domains and TLS
- Keycloak
- Generic OIDC and GitLab
- Configuration
- First deployment
- Backups
- RPO and RTO
- Restore the Studio on a fresh installation
- Redeploys
- Upgrading the server and checking state after a migration
- Limits of going back
- Monitoring
- Security
- Rotating keys
- Recovering admin access
- Changing domain or OIDC provider
- Worker, PostgreSQL or Cellar down
- Exporting the game and leaving the installation
- Retention
- Clever Cloud troubleshooting
- Costs and teardown
Reality Bridge and connectors (16)
- The Reality Bridge: what it is
- Quick start
- Guarantees
- Install and run the Bridge
- Backup and restore
- Several tenants
- Signals and the manifest
- The Bridge's command line
- Connectors overview
- Email connector
- Telnet connector
- SSH connector
- Open Badges connector
- The connector SDK
- Security: Biscuit and signatures
- Bridge and connector troubleshooting
Contribute (25)
- Welcome
- Developer setup
- The dev loop
- Before a pull request
- Conventions
- Writing documentation
- Architecture
- Code tour
- Import boundaries
- Which tests run when
- Mutation testing
- The coverage ratchet
- The quality baseline
- CI explained
- Field passes
- Benchmarks
- Releasing
- npm packages
- Decisions and ADRs
- Governance
- Bot pull requests
- Contributing with AI agents
- Security policy
- Code of conduct
- Licences and credits