game-dev
Build playable browser games (Babylon.js) end-to-end using the godogen production pipeline adapted to Manus. Use when the user wants to make, generate, rebuild, or substantially extend a web/browser g
SKILL.mdskills/game-dev/SKILL.md
GitHubGame Dev
Build complete, playable Babylon.js browser games from a natural-language brief, following the godogen production pipeline but running it natively inside Manus.
This skill keeps godogen's engine (Babylon.js) and its disciplined workflow, while adapting three things to the Manus environment:
- Host shell → a Manus WebDev React project (not godogen's bare Vite scaffold).
- Art → Manus built-in image generation (
generatemode), replacing godogen's paid Gemini/Grok/Tripo3D CLIs. The art step is mandatory, never skipped. - Deploy → WebDev Publish to
*.manus.space. Temporaryexposelinks are forbidden as the deliverable.
Layering principle to keep in mind throughout: React = picture frame, Babylon = canvas, godogen game code = the painting.
Resources in this skill
references/manus-adaptations.md— read this first. Exact rules for the WebDev host, the image-generation art step, screenshot verification, and WebDev deployment. Overrides godogen stage files where they conflict.references/godogen-stages/*.md— the unmodified godogen stage instructions (visual-target,decomposer,architecture,scaffold,asset-planner,asset-gen,rembg,task-execution,quirks,scene-generation,capture, plusgodogen-skill-overview.md). Read each stage file only when you reach that stage. Treat them as the source of truth for how a good game is built; apply the Manus adaptations for where it runs and how art/deploy happen.templates/GameCanvas.tsx— the Babylon-in-React integration component (single full-screen canvas, lifecycle-safe). Drop into the WebDev project.
Pipeline (godogen, adapted)
Follow these stages in order. On resume, if PLAN.md already exists in the project, read PLAN.md/STRUCTURE.md/MEMORY.md/ASSETS.md and skip to task execution.
- Set up the WebDev host.
webdev_init_project(scaffoldweb-static).pnpm add @babylonjs/core(add@babylonjs/loadersonly for GLB).webdev_restart_server. AddGameCanvas.tsxfrom the template and make<GameCanvas />the sole content of the/route. Seereferences/manus-adaptations.md§1 for the non-negotiable canvas/React lifecycle contract. - Visual target. Read
references/godogen-stages/visual-target.md. Entergeneratemode and produce a reference image defining art direction. Record it inASSETS.md. (Art step is mandatory — see §2 of adaptations.) - Decompose + risks. Read
references/godogen-stages/decomposer.md. WritePLAN.mdwith risk slices and verification criteria. Isolate high-risk features first (procedural generation/animation, sprite animation, vehicle physics, custom shaders, runtime geometry, dynamic navigation, complex cameras, pointer-lock, GLB import pipelines); everything else is main build. - Architecture. Read
references/godogen-stages/architecture.md. Keep gameplay as plain TS classes underclient/src/game/(GameWorld, Player, managers, etc.), framework-agnostic. WriteSTRUCTURE.md. - Assets. Read
references/godogen-stages/asset-planner.md+asset-gen.mdfor what to plan, but generate via Manusgeneratemode (adaptations §2). Upload generated PNGs withmanus-upload-file --webdevand use the returned/manus-storage/...URL as Babylon textures. Default to procedural meshes + generated textures; only use real GLB models if the user supplies a Tripo3D key. MaintainASSETS.md. - Implement. Read
references/godogen-stages/task-execution.md,quirks.md, andscene-generation.md. Build risk slices first, then the main build. Inner loop: editclient/src/game/**→ HMR → screenshot → check. - Verify (trust the picture). Use
webdev_take_screenshotagainst the WebDev preview (adaptations §3), not godogen'scapture.mjs. Add a?demodeterministic AutoPilot so screenshots show real gameplay. Runpnpm check. If a requirement is not visible in a screenshot, it is unfinished. When code and picture disagree, trust the picture. - Deploy via WebDev.
webdev_save_checkpoint, then direct the user to click Publish (adaptations §4). NEVER hand off a temporaryexposelink.
Non-negotiable rules
- Art is mandatory and uses Manus built-in image generation. Never silently skip art or ship only flat placeholder colors. Procedural geometry is fine, but art direction must come from a generated reference and generated textures/assets.
- Deployment is always WebDev Publish. Temporary/proxy links are not an acceptable final deliverable.
- Keep godogen context files (
PLAN.md,STRUCTURE.md,MEMORY.md,ASSETS.md) in the project root for fidelity and resumability. - Preserve godogen philosophy: risk slices first, read stage files on demand, and verify visually.
- Respect the Babylon-in-React contract (init once, dispose on unmount, handle resize, guard StrictMode) — see template and adaptations §1.
Quirks worth front-loading
- React 19 StrictMode mounts effects twice in dev → guard Babylon engine init with a ref flag, or you get two engines on one canvas.
- Do NOT commit large image assets into the WebDev project tree (deploy timeout). Always go through
manus-upload-file --webdevand reference the returned URL. - Import Babylon from deep module paths to keep the bundle small.
- Babylon needs a non-zero-size canvas; the full-screen
fixed inset-0canvas in the template handles this. Callengine.resize()on window resize.