Repository navigation
EN Create Static Game On Clever
Français · Type: how-to · Audience: author · Context: engine repository, created project · Status: ready · Applies from: 4.2.5
The game is a static site; on Clever Cloud it runs as a small Node application that builds dist/ at each deploy and
serves it. This page is for the game alone. Hosting the team Studio is another matter: Clever Cloud overview.
A Clever Cloud Node application, deployed with git push through clever deploy, that serves your game at its
domain. Each deploy builds the game again from the pushed commit.
Two cases, with different set-ups:
-
The engine repository (a game in
games/<id>/):npm startservesdist/with sirv (scripts/start.mjs), on every interface, on$PORT(8080 when unset), every file withCache-Controlmax-age=3600. The launcher exists since 4.1.8.public/assetsis committed in this repository, so the deploy needs Vite only, not Python. -
A created project (
quest-n-click create): it has nostartscript and no static server (the engine package leavessirv-cliout), andpublic/assetsis not committed, so the deploy must run the asset step, which needs Python and Pillow.
The page applies from 4.2.5. Verified on: not verified. The engine repository's settings below are the ones
docs/en/TOOLS.md gave through 4.4.0; nobody has replayed this page on a live Clever Cloud application, and the
created-project case has never been deployed there by the project. Read each command before you run it.
- A Clever Cloud account and
clever-tools, logged in (clever login). - The game builds on your machine (Build and release a game): the deploy runs the build again, and a failing build leaves the previous version online.
- The project is a Git repository with its work committed:
clever deploypushes the current branch's commit.
On your machine, in the engine repository or in the created project: clever … links that folder to the application
and pushes its Git history. The build itself runs on Clever Cloud.
-
Create a Node application and link it to the folder:
# in the engine repository or the created project clever create --type node my-game
-
Configure the build.
Engine repository: Vite is a development dependency, the build is
build:web, andGAMEnames the game (elsepackage.json→config.game, elsedemo):# in the engine repository clever env set CC_NODE_DEV_DEPENDENCIES install clever env set CC_POST_BUILD_HOOK "npm run build:web" clever env set GAME my-game
Created project: give it a server and a start command, then a build hook that installs Pillow next to the application and builds:
# in the created project npm install sirv-cli@3 npm pkg set scripts.start="sirv dist --host 0.0.0.0 --port \$PORT --maxage 3600" clever env set CC_POST_BUILD_HOOK "python3 -m pip install --target .python -r node_modules/quest-n-click/requirements.txt && PYTHONPATH=.python npm run build" git add package.json package-lock.json && git commit -m "Serve dist/ on Clever Cloud"
The created project's
buildrunsverify(the solver included) on the server, on every deploy.
- Leave
BASE_PATHunset: the application serves the game at the root of its domain. Set it only if a proxy in front publishes the game under a sub-path (Sub-path).
-
Deploy, and follow the logs:
# in the engine repository or the created project clever deploy clever logs
- Open it at the domain Clever Cloud gives (
clever open), or add yours withclever domain add play.example.organd its DNS record.
Limit ·
build-web-skips-checksIn the engine repository,build:webis the Vite build alone: no validation, solver,verify:distnor spoiler check. Runnpm run build(or let CI run it) before you deploy; the deploy does not.
-
clever logsshows the hook's build, then sirv listening on port 8080. - The game opens at the application's domain; the pause menu's "Offline" row (or its translation) ends at "complete" (the engine's default text; a game translates it).
- In the engine repository,
node scripts/e2e.mjs https://<your-domain>/plays it to the end.
| Symptom | Cause | Fix |
|---|---|---|
vite: not found in the build log |
Development dependencies not installed (engine repository) | CC_NODE_DEV_DEPENDENCIES=install |
| The application never becomes healthy | Nothing listens on $PORT, or only on 127.0.0.1
|
npm start must serve on 0.0.0.0:$PORT (the launcher and the script above do) |
No module named 'PIL' |
The hook did not install Pillow, or PYTHONPATH is missing |
Keep both parts of the created project's hook |
| The demo game instead of yours |
GAME unset in the engine repository |
clever env set GAME <id>, then deploy |
| The previous version still shows | The service worker waits for the player; index.html is cached for an hour |
Cache and service worker |
- The application and its variables on Clever Cloud; a
cleverremote and.clever.jsonin the folder. - Created project:
package.json(start, thesirv-clidependency) andpackage-lock.json. -
dist/and.python/on the application's file system, rebuilt at each deploy.
A failed build is not deployed: the running instance keeps serving the previous version. To go back to an earlier
version, revert the commit and clever deploy again; players' caches and saves then follow
Going back. clever delete removes the application.
-
scripts/start.mjs(npm start),package.json(build:web). -
tools/game.ts: howGAMEchooses the game. -
cli/quest-n-click.mjsandscripts/pack.mjs: a created project's commands, and the package withoutsirv-cli. - The variables:
CC_POST_BUILD_HOOK,CC_NODE_DEV_DEPENDENCIES,PORT,GAME.
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