Repository navigation
EN Create Minigames
Français · Type: reference · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.2.5
The engine ships eight minigames. A game plays one with the minigame command; when it ends, the commands in then
run. This page lists each one, its gesture and its parameters, as the 4.4.0 code reads them
(src/engine/minigames/). To write your own, see
A custom minigame.
Each minigame declares its contract: required params, textParams (the player-visible strings, extracted for
translation) and bindings (the params that name an image or a sound: validate checks they exist, e.g. stroke's
sfx, cables' sfx.ring / sfx.stamp, scratch's ticket and sfx). Their metadata is in
src/engine/minigames/meta.ts.
Where the commands run: this page writes them for the engine repository (
npm run validate,npm run solve, withGAME=<id>in front for another game than the default). In a created project, the same tools arenpx quest-n-click validate,npx quest-n-click solve(--prove,--chapters),npx quest-n-click lint,npx quest-n-click i18n statusandnpx quest-n-click voices, and the sources are ingame/instead ofgames/<id>/.
Every minigame but pick and code-wheel accepts intro (a line from the hints voice at the start); pick shows
each round's prompt instead, code-wheel its question. Every one but scratch accepts win (the closing line). The engine never names an
image: each minigame gets its own from params. Bold parameters are required; npm run validate flags the ones
that are missing (minigame "pipes": missing required param "tank"), and an unknown id
(unknown minigame: "…" (known: …)).
| Id | Gesture | Parameters |
|---|---|---|
pipes |
Tap a pipe to rotate it a quarter turn |
tiles { ground, straight: [dry, wet], elbow: [dry, wet], tee: [dry, wet] } (base images: straight left-right, elbow left-down, tee left-right-down), source, nozzle [dry, spraying], tank, mushrooms [thirsty, happy], cols (4), rows (3), helpAfter (15 taps before the right pipe glows), background
|
stroke |
Pet slowly: a gauge rises |
target (the animal's image), hand (the ghost hand's image), goal (100), sfx (the success sound), tooFast (line shown if too fast) |
pick |
Tap the right image |
rounds [{ prompt, options: [image…], answer }], decoy (a trick image), decoyLine, wrongLine, background
|
hide |
Find the right hiding spot |
spots [{ img, x, y, h, reply, found }], bg (background image), answer (index of the right one; default the last spot) |
runner |
Top of the screen: jump, bottom: duck |
hero { run: [images], jump, slide, stumble, h, slideH }, buddy (same shape, a second runner behind), chaser { frames: [images], fps, x, speed, h }, obstacles { jump, duck } (jumped over on the ground, ducked under when suspended), bg (scrolling background), seconds (20), stumble (line shown on a stumble) |
cables |
Pull a plug: its cable wiggles through the knot; drag it onto the right socket |
board (a 4-socket panel), knot, plugs { color: image } (free color ids, 4 at most), sockets (order of the colors on the panel, top to bottom), tints { color: css }, gags (lamp, phone, toaster, windows; a gag missing its images or text is dropped), lampOn, lampOff, phone, toaster, windowsText, sfx: { ring, stamp }, helpAfter (4), background
|
scratch |
Scratch a ticket |
ticket (image), text, color, sfx (sound while scratching), threshold (0.55 of the surface), cover (text printed on the silver layer), hold (3200 ms shown once revealed), background, skippable; used by the sealed ending via ending.scratch
|
code-wheel |
Turn two discs, read the window, type the answer |
actors [{ id, label, img? }] (3 to 11, an odd number), symbols (as many), answers (as many, all different), mode (parody), tries (3), seed, and the texts question, wrong, pass, win, fail, list, turnLeft, turnRight
|
A game can add its own minigames: export const minigames = { mygame: { required: ['…'], run(ctx) { … } } } in
index.ts (A custom minigame).
Example:
{ music: { push: 'minigame' } },
{ minigame: 'pipes', params: {
tiles: { ground: 'pipes/r3c1', straight: ['pipes/r3c2', 'pipes/r3c5'], elbow: ['pipes/r3c3', 'pipes/r3c6'], tee: ['pipes/r3c4', 'pipes/r4c1'] },
source: 'pipes/r4c2', nozzle: ['pipes/r4c3', 'pipes/r4c4'], tank: 'house/r3c6', mushrooms: ['house/r4c5', 'house/r4c6'],
intro: 'Khhh… turn the pipes… until the plants get water.', win: 'Khhh… they drank.',
}, then: [
{ music: { pop: true } },
{ say: ['grandpa', 'Thanks. Now I remember: I left your key at the market.'] },
{ unlock: 'market' },
] },{ music: { push: 'minigame' } } and { music: { pop: true } } around it switch to the minigame's music and back
(Music in stems).
Limit ·
minigame-solver-counts-wonThe solver does not play a minigame: it counts it as won and runsthen. A puzzle that only a minigame's result decides is not proven bynpm run solve.
-
Skip. Every built-in minigame has a "Skip" button, except
scratch(the sealed ending itself, unlessskippable: true) and acode-wheelinstrictmode. Skipping still runsthen, so the story goes on. Its label is the game'sui.skip. -
Failure. None of the built-in minigames can be failed, except a
code-wheelinstorymode, which endsfailedafter itstries. -
The result (4.1.16). In the player, a minigame that ends writes how it ended in the reserved flag
minigame.<id>:won,passed,skipped,failedordisabled(every minigame saysskippedorwon; only the code wheel says the others). The story reads it with{ flag: 'minigame.pipes', eq: 'skipped' }, the journal reports it asflagChanged, and a session records it so a replay plays it back. A command can never set aminigame.*flag (the validator refuses it). The solver records none: it does not explore branches hung on that flag.
Use one as a gate the player understands: the fiction says why you play it. The tank needs another way out, so you
lay pipes. The seller wants flowers, so you pick them. Keep it short: 30 seconds, not 3 minutes (three rounds of
pick, one 4 × 3 grid of pipes), with helpAfter so the right pipe glows when the player is lost, and intro and
win lines in the hint voice. The reasoning is in Puzzle design.
| Minigame | Fits a fiction about |
|---|---|
pipes |
water, plumbing, irrigation, anything that flows |
cables |
electricity, a switchboard, a tangle behind the TV |
pick |
shopping, choosing the right one, a recipe, a line-up |
hide |
hide and seek, finding someone or something in a scene |
runner |
a chase, an escape, a race to catch a bus |
stroke |
calming an animal, putting a baby to sleep |
scratch |
the sealed ending only (The sealed ending) |
code-wheel |
a playful copy-protection wheel of the 1990s, drawn from your own characters (Remix) |
A grid of pipes (cols × rows, default 4 × 3, at least 2 × 1) to rotate until water runs from source to the
nozzle, which waters the mushrooms. Required: tiles, source, nozzle, tank. Texts: intro, win.
helpAfter (15) is the number of taps before the right pipe glows.
Pet the target slowly with a finger; the ghost hand shows the gesture; a gauge rises to goal (100). Required:
target, hand. Texts: intro, win, tooFast. Binding: sfx must be a sound of audio.sfx.
Rounds of images; tap the answer of each. Required: rounds. Texts: each round's prompt, decoyLine,
wrongLine, win; no intro (the first round's prompt opens it). A decoy image says decoyLine when tapped.
Hiding spots drawn over bg; each answers with its reply, the right one (answer, default the last spot) ends it.
Required: spots. Texts: intro, win, each spot's reply.
A side-scrolling chase for seconds (20): tap the top of the screen to jump, the bottom to duck. Required: hero,
chaser, obstacles, bg. Texts: intro, win, stumble. The jump and duck labels are the game's interface
texts.
Up to four plugs, each tangled in the knot, to drag onto the right socket of the board. Required: board, knot,
plugs. Texts: intro, win, windowsText. Bindings: sfx.ring and sfx.stamp must be sounds of audio.sfx. A
gag (lamp, phone, toaster, windows) missing its images or its text is dropped.
A silver layer that rubs off under a finger; it ends when threshold (0.55) of the surface is scratched and the
text was shown for hold ms (3200). Required: ticket. Text: intro (the text is the decrypted sealed ending,
given at run time, never content to translate). Bindings: ticket (an image) and sfx. Used by the sealed ending
through ending.scratch.
feature since 4.1.15
"The Extremely Legitimate Pirate Check": two discs drawn from the game's own characters and symbols, never DRM (the
answer is in the page, and the wheel says so). Required: actors, symbols, answers: an odd number of actors from
3 to 11, as many symbols and as many different answers. mode: parody (default: after tries wrong answers, 3 by
default, the player is let through, passed), story (ends failed after its tries), strict (no skip, never lets
through), cosmetic (any answer wins), disabled, daily. The seed is filled from the world's seed by Remix.
Turned by buttons, arrow keys or a gamepad, announced to a screen reader, readable as a plain list. npm run code-wheel
prints it. Everything about it, its proof and the speedrun rules: Remix.
- The command:
{ minigame: '<id>', params: { … }, then: [ … ] }(Game commands). - The flag
minigame.<id>;ending.scratch;audio.sfxfor the bindings. -
npm run validate,npm run i18n(thetextParamsare extracted for translation). - The API:
minigames,Minigame,MinigameCtx,MINIGAME_CSSfromquest-n-click/minigames(Public API).
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