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.

Built-in 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.

The contract, and the list

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, with GAME=<id> in front for another game than the default). In a created project, the same tools are npx quest-n-click validate, npx quest-n-click solve (--prove, --chapters), npx quest-n-click lint, npx quest-n-click i18n status and npx quest-n-click voices, and the sources are in game/ instead of games/<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: …)).

IdGestureParameters
pipesTap a pipe to rotate it a quarter turntiles { 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
strokePet slowly: a gauge risestarget (the animal's image), hand (the ghost hand's image), goal (100), sfx (the success sound), tooFast (line shown if too fast)
pickTap the right imagerounds [{ prompt, options: [image…], answer }], decoy (a trick image), decoyLine, wrongLine, background
hideFind the right hiding spotspots [{ img, x, y, h, reply, found }], bg (background image), answer (index of the right one; default the last spot)
runnerTop of the screen: jump, bottom: duckhero { 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)
cablesPull a plug: its cable wiggles through the knot; drag it onto the right socketboard (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
scratchScratch a ticketticket (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-wheelTurn two discs, read the window, type the answeractors [{ 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-won The solver does not play a minigame: it counts it as won and runs then. A puzzle that only a minigame's result decides is not proven by npm run solve.

Skip, failure and the result

Choosing one for the story

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.

MinigameFits a fiction about
pipeswater, plumbing, irrigation, anything that flows
cableselectricity, a switchboard, a tangle behind the TV
pickshopping, choosing the right one, a recipe, a line-up
hidehide and seek, finding someone or something in a scene
runnera chase, an escape, a race to catch a bus
strokecalming an animal, putting a baby to sleep
scratchthe sealed ending only (The sealed ending)
code-wheela playful copy-protection wheel of the 1990s, drawn from your own characters (Remix)

pipes

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.

stroke

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.

pick

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.

hide

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.

runner

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.

cables

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.

scratch

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.

code-wheel

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.


Edit the source of this page · Report an error