Game Studio (profy-game-studio)
One-line definition
profy-game-studio lets an expert build a genuinely playable browser game from nothing — pick an engine, lay out the architecture, write the game loop, wire up physics, build the HUD — and then playtest it repeatedly until it actually plays before handing it over. That last step is the fundamental difference between this plugin and “ask an AI to write a small game”.
Activation
browser. The reasoning is direct: game development uses ordinary sandbox capabilities (write files, run a dev server, install dependencies). The one thing missing is “see the screen and operate it”, which is precisely the browser tool. So ticking Game Studio always lights up browser too; without it the playtest loop is empty.Engine selection matrix
Engine choice is the first decision in a game project and the most expensive one to get wrong — a bad pick means a rewrite. The prompt carries a full decision table:Dimension-by-dimension
When not to use each
This inverse list is more useful than the recommendations:- Three.js: not for simple 2D games — massive overkill
- R3F: not when entity counts are high; React overhead becomes the bottleneck
- Phaser: not for 3D, and not when you need a custom render pipeline
- Canvas2D: not for complex physics or 3D
Six architecture principles
The prompt hard-codes these six, so the structure of the code you receive is predictable:1. Game loop: fixed-timestep physics (60Hz), variable render
1. Game loop: fixed-timestep physics (60Hz), variable render
2. ECS-lite: separate data from logic
2. ECS-lite: separate data from logic
3. Input abstraction: raw events map to semantic actions
3. Input abstraction: raw events map to semantic actions
jump and move_left rather than checking event.key === 'ArrowLeft' in a dozen places. Support keyboard, touch, and gamepad. This turns “add gamepad support” from a rewrite into one more mapping layer.4. Asset pipeline: async preload, progress, aggressive caching
4. Asset pipeline: async preload, progress, aggressive caching
6. Test hooks: interactive controls carry data-game-action
6. Test hooks: interactive controls carry data-game-action
data-game-action attributes so browser automation can replay user paths semantically instead of clicking brittle visual coordinates. This principle exists to serve the automated playtest below.The debug projection: making playtests assertable
This is the technical core of the whole workflow. Every game must expose a read-only debug projection:player.x really increased after a right-arrow press, and that score really incremented after collecting a coin — rather than comparing two screenshots for pixel movement. When a specific mechanic needs proving, the projection is extended on demand (a tower defense game gains waveIndex and towerCount).
The automated playtest loop
The “Vision in the Loop” protocol, in its game-specific form, adds interaction replay:Generate or modify code
Capture
browser(action="screenshot", url="localhost:5173")Read pixels
image(action="read", ..., prompt="Check gameplay visibility, HUD, framing, artifacts, and blank regions")Assert state
browser(action="evaluate", code="window.__GAME_DEBUG__?.snapshot()")Replay interaction
document.querySelector('[data-game-action=start]')?.click()Keyboard: dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight' }))Diagnose jointly
Loop on any issue
Game-specific acceptance
Beyond general visual checks, games must pass:- The player responds to input (inject test input → screenshot after N frames)
- Score and UI update correctly
- Objects do not fall through floors (physics tunneling)
- The game-over condition triggers appropriately
- Restart returns to a clean state with no leaks
Performance gates
Edge cases
The canvas must adapt on window resize, and the game must pause on tab switch (visibilitychange). Both are routinely forgotten; the symptom of the second is coming back to a tab to find your character already dead.
Skills and references
9 declared skills (text injected into the prompt)
physics-game, is undeclared in the manifest but loadable by name through the skill tool.
16 reference files (read on demand, no default context cost)
alternative-3d-engines / engine-selection / frontend-prompts / gltf-loading-starter / phaser-architecture / playtest-checklist / rapier-integration-starter / react-three-fiber-stack / react-three-fiber-starter / sprite-pipeline / three-hud-layout-patterns / three-webgl-architecture / threejs-stack / threejs-vanilla-starter / web-3d-asset-pipeline / webgl-debugging-and-performance
The four -starter files are copy-ready templates.
Executable examples
2D platformer
2D platformer
data-game-action hooks, and verifies during playtest that jumps genuinely rise and fall and that falling genuinely restarts.3D first-person exploration
3D first-person exploration
Tower defense with a React UI
Tower defense with a React UI
waveIndex and towerCount so wave logic can be asserted.Fixing an existing game
Fixing an existing game
Boundaries and failure modes
Known defect: three sprite scripts are placeholders
The three scripts underscripts/ currently only print a line of text — there is no real implementation:
sprite-pipeline skill document manually. How to spot it: the model reports “sprite preview sheet generated” but no image file exists.
Verify
Confirm activation
Minimal playable
Confirm the debug projection exists
window.__GAME_DEBUG__.snapshot(). A state object means the architecture rules were followed; undefined means this step was skipped and playtesting has degraded to purely visual.Confirm the self-check loop ran
evaluate calls before delivery. Handing you raw code instead usually means the browser tool was not bound.Related pages
3D development
Visualize
inspect_3d Three.js scene diagnostic toolBrowser automation
Sites
services/agent-runtime/src/plugins/builtin/game-studio/plugin.json, prompts/GAME_STUDIO.md, references/{engine-selection,playtest-checklist}.md, scripts/*.py.
