Repository navigation
EN Create First Game
Français · Type: tutorial · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.3.0
The shortest path from nothing to a room you can play on your phone, with the files you touch named at each step.
A game of one room from the template: a garden, a bucket, a gate. Take the bucket, use it on the gate, the end. You add a lamp the hero can switch on, place it with the mouse, tell it in the storyboard, check the game with the validator and the solver, and play it on your phone. The steps are planned for about fifteen minutes. Everything you will write afterwards is a variation of what is already there.
The content is data. Rooms, props with states, characters, items, rules, conversations, hints, scripts and events are plain TypeScript objects, with no code in them, so every tool can read, check and play them:
export const garden: RoomDef = {
id: 'garden', name: 'The garden', decor: 'garden',
props: { tank: { name: 'water tank', states: { full: 'tank_full', empty: 'tank_empty' } } },
exits: { back_door: { name: 'back door', to: 'house', entry: 'garden' } },
on: [
{ verb: 'use', a: 'pipe', b: 'tank', if: '!tank_drained',
do: [{ minigame: 'pipes' }, { lose: 'pipe' }, { set: 'tank_drained' }, { prop: ['tank', 'empty'] }] },
],
hints: [{ until: 'tank_drained', lines: ['Use the pipe on the water tank.'] }],
};A rule is a verb, a target, a condition and a list of commands. What a game needs beyond them, a custom command, is TypeScript of its own: trusted code, named in the game and hashed with it (custom code). Famous mechanics of the genre are written this way in classic mechanics. The Studio is the real engine with an editor on top: rooms with their placements, the storyboard panel by panel, the checks after every save (the local Studio).
Art, sound and languages. A prompt for every sprite sheet, object and backdrop in one style, and sheets cut into sprites (images); chip-tune music arranged from a MIDI and sound effects from one palette (music, sound effects); every line translatable, a missing translation found before release (translations).
- Node 22.12 or later; Python 3 with Pillow for
npm run assets(pip install -r node_modules/quest-n-click/requirements.txtin a created project,pip install -r requirements.txtin the engine repository). See requirements. - A phone on the same network, for the last step (optional).
- One of two places to work, the same steps in both (which is which):
-
a created project, where the game is
game/; this page's paths saygame/; -
the engine repository, where the game is
games/<id>/(heregames/lamp/).
-
a created project, where the game is
In a new folder of your choice, make a created project:
# anywhere on your machine: makes the folder my-game
npx create-quest-n-click my-game "My Game" # or: npx quest-n-click create my-game "My Game"
cd my-game
npm install
npm run assets # the placeholder art into public/assets
npm run dev # http://127.0.0.1:5173/: a garden, a bucket, a gateUntil the packages are on npm, take the tarball a release attaches (install from the release archive):
# anywhere on your machine
T=https://github.com/wanoo/quest-n-click/releases/download/v<version>/quest-n-click-<version>.tgz
npx --package=$T quest-n-click create my-game "My Game" --engine=$TOr, in the engine repository, the same template becomes games/lamp, set as the current game (.cache/game):
# in the engine repository
npm install
npm run new-game lamp "The Lamp"
npm run assets
npm run devYou see a garden. The template is a complete game of one room. Its art is a placeholder drawn from shapes
(tools/placeholder-art.py): provenance.json says so, and a release refuses it until each file is replaced and
reviewed.
game/rooms/start.ts (games/lamp/rooms/start.ts) is the whole room. Read it top to bottom: props (things with an
image), hotspots (places on the backdrop), look (one line, or three that cycle, for each of them), on (the rules:
a verb, a target, a condition, what happens), hints (what the hint item says, until a flag is set), onEnter.
Geometry is not here: layout/start.json holds where things stand, and only the Studio or the placement editor
writes it (geometry).
Add a lamp to the garden. In rooms/start.ts:
props: {
bucket: { name: 'bucket', img: 'starter/items/bucket' },
lamp: { name: 'lamp', img: 'starter/items/bucket', states: { off: 'starter/items/bucket', on: 'starter/items/bucket' } },
},
look: {
// …
lamp: ['A garden lamp. Off.', 'Still off.', 'It is thinking about it.'],
},
on: [
// …
{ id: 'start.light-lamp', verb: 'use', a: 'lamp', if: '!lamp_on',
do: [{ set: 'lamp_on' }, { prop: ['lamp', 'on'] }, 'There. Light.'] },
],The image is the bucket's for now (npm run prompts writes the prompt for a real one, and the Studio's Assets tab
cuts what you generate: images). A rule is a verb, a target, a condition and a list of commands; a
string in do is a line the hero says. { prop: ['lamp', 'on'] } switches the prop's state, { set: 'lamp_on' }
remembers it in the save (reactions, commands).
# in the created project, or in the engine repository
npm run studio # the Studio opens; Rooms tab, "start"The lamp has no place yet, so the Studio shows it at the default spot. Drag it where you want, drag its height, save:
layout/start.json gains a lamp entry. Never type coordinates by hand; the editor and the Studio exist for that.
Until it is placed, validate says no position in the layout.
storyboard.json is the source of truth for the text: add a panel to the garden board ("action": "Use lamp", the
line the hero says) (the storyboard). The Storyboard tab shows what is implemented and what is
not; the Check tab runs the validator and the solver after every save. From the terminal:
# in the engine repository
npm run validate # a prop without a look line, a flag nothing reads, a rule nobody can reach: said here
npm run solve # a way from New Game to the end, printed step by step; "softlock" if the player can get stuck
npm test # the engine's tests and your game's walkthrough (games/lamp/tests/game.test.ts)# in the created project
npx quest-n-click validate
npx quest-n-click solve
npm run verify # validate, solve, i18n status, lint, playtestsA rule the solver never needs is not a bug (the lamp is decoration), but npm run lint
(npx quest-n-click lint) tells you it is decoration (checking your game).
# in the engine repository
npm run dev:lan # the dev server on your network; open the printed URL on the phone, landscapeA created project has no dev:lan: testing on a phone over the LAN says how to do it there.
Tap the lamp with Use. The line shows, the prop changes, and the save remembers it when you reload.
Limit ·
tutorial-scopeThis tutorial leaves out the art (the lamp keeps the bucket's image), the map, characters and conversations, and publishing. Each has its page below.
That is the loop: write a rule, place it, check, play (the working loop).
- A room is data: props, hotspots, look lines, rules (rooms).
- Geometry lives in
layout/, placed with the mouse (geometry). - The validator and the solver check the game after each change (checking your game).
- Rooms, field by field; reactions; commands; conditions.
- Classic mechanics: famous puzzles written with these fields.
- The local Studio, and puzzle design for a whole game from the first idea to the release.
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