Repository navigation
EN Create Other Static Hosts
Français · Type: how-to · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.2.5
dist/ is a static folder: Netlify, Cloudflare Pages, an nginx or Apache server, an object storage bucket with a web
front, any host that serves files can serve the game. This page says what such a host needs, whether it builds the game
itself or you upload a dist/ built elsewhere.
The game served by the host of your choice, with its service worker updating cleanly and its offline cache working.
- A created project or the engine repository; the build is the same (Build and release a game).
- From 4.2.5.
-
Verified on: not verified. The project builds and checks
dist/on every push, and deploys it to GitHub Pages only; no other host is tested by the project. The settings below follow from what the build produces (vite.config.ts), not from a run on each host.
- The game builds on your machine.
- The host's address: at the root of a domain, or under a sub-path (which sets
BASE_PATH).
The build runs in the created project or the engine repository: on your machine, in your CI, or in the host's build step. The upload (or the host's settings) is the host's own tool.
-
Choose where the build runs.
- On your machine or in your CI, then upload
dist/: the host needs nothing but files. The simplest, and the only way when the host has no Python. - In the host's build step: give it the same settings as any CI.
Setting Value Build command (created project) pip install -r node_modules/quest-n-click/requirements.txt && npm run buildBuild command (engine repository, public/assetscommitted)npm run build:webafter the checks, ornpm run buildOutput folder distNode 22.12 or later Python 3, with pip (created project) ffmpeg when the game has audio or video to encode GAMEthe game's id (engine repository) - On your machine or in your CI, then upload
-
Set
BASE_PATHwhen the site is not at the root of its domain:BASE_PATH=/games/my-game/forhttps://example.org/games/my-game/, with a slash at both ends. At a domain's root, leave it unset. See Sub-path.
-
Set the cache headers, where the host lets you:
Path Header Why index.html,sw.js,manifest.webmanifestCache-Control: no-cacheThe page and the worker must be checked at each visit for an update to be seen assets/*.js,assets/*.css,workbox-*.jslong, e.g. max-age=31536000, immutableTheir names carry a hash: a new build gives new names assets/img/,assets/audio/,assets/video/long is safe Their addresses carry ?v=<hash>, which changes when any asset changesdata/(the sealed ending's file)no-cacheThe game asks the network first for it Serve
.webmanifestasapplication/manifest+json,.webpasimage/webpand.oggasaudio/ogg.
-
Upload all of
dist/at once, or in this order: everything butindex.htmlandsw.jsfirst, then those two. A page that names files not yet uploaded is a blank page for a new visitor (Incomplete deploy).
An nginx server, as an example (not tested by the project):
# the game at the root of play.example.org, dist/ copied to /srv/my-game
server {
server_name play.example.org;
root /srv/my-game;
location = /index.html { add_header Cache-Control "no-cache"; }
location = /sw.js { add_header Cache-Control "no-cache"; }
location = /manifest.webmanifest { add_header Cache-Control "no-cache"; }
location /data/ { add_header Cache-Control "no-cache"; }
location /assets/ { add_header Cache-Control "public, max-age=31536000"; }
}Limit ·
https-requiredA service worker only registers on HTTPS (orlocalhost). On plain HTTP the game plays online but neither installs nor plays offline.
- The game opens at its address; the browser's developer tools show
sw.jsactive, under the address's path. - The pause menu's "Offline" row ends at "complete" (the engine's default text; a game may change it).
- After a new deploy, the "A new version is ready." banner (in the game's own words when it is translated) appears on the next visit; "Save and update" (translated the same way) loads it.
- In the engine repository:
node scripts/e2e.mjs https://<your-site>/plays the deployed game to its ending.
| Symptom | Cause | Fix |
|---|---|---|
A blank page, 404 on /assets/index-….js
|
Under a sub-path, built without BASE_PATH
|
Step 2 |
| Players never get the new version |
sw.js or index.html cached long by the host or a CDN |
Step 3 |
| The game neither installs nor plays offline | Served over plain HTTP: the browser gives no service worker | Serve on HTTPS |
| Music cuts or does not play | The host refuses the file, or serves a wrong type | Serve .ogg as audio/ogg
|
Only on the host: the files of dist/ and its settings. Nothing in the project.
Upload the dist/ of an earlier build (keep the builds you shipped, or rebuild the commit). Players move to it through
the update banner; see Going back.
-
vite.config.ts: the service worker, its precache and its runtime caches. -
src/engine/dom/assets.ts: the assets' addresses and their?v=. - Publish on GitHub Pages, The static game on Clever Cloud.
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