Skip to main content

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

This plugin injects no proprietary tools — it binds only 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
If you have an engine preference, say so in the request. Otherwise the model decides from the table above — usually correctly, but not necessarily the way you wanted.

Six architecture principles

The prompt hard-codes these six, so the structure of the code you receive is predictable:
Logic must never be tied to frame rate. When it is, the character sprints on a high-refresh display, crawls on a weak machine, and physics tunnels through geometry whenever frames drop. This is the most common structural mistake in first games and the hardest to fix later.
Even without a formal ECS framework, keep state and rendering apart. The benefit only shows up when requirements change — if “add a new enemy type” requires touching render code, this principle was not followed.
Map to 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.
Load assets before the game starts and show progress. Loading while playing is not smoothness, it is stutter.
Game states belong in an explicit finite state machine, not scattered booleans. A condition like isPaused && !isGameOver && hasStarted is the symptom of a missing state machine.
Give interactive controls stable 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:
The load-bearing words are “projection” and “read-only” — it does not duplicate game state, it reads the current state out. So it introduces no new state-desync failure mode of its own. With it, playtesting shifts from “look at a screenshot and guess” to “read state and assert”:
The model can confirm directly that 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).
Screenshots and state assertions solve different problems. A screenshot catches “nothing rendered”. A state assertion catches “it rendered correctly but the logic is wrong”. Doing only the first ships a beautiful game where the keys do nothing — precisely the blind spot of purely visual verification.

The automated playtest loop

The “Vision in the Loop” protocol, in its game-specific form, adds interaction replay:
1

Generate or modify code

Write the game code.
2

Capture

browser(action="screenshot", url="localhost:5173")
3

Read pixels

image(action="read", ..., prompt="Check gameplay visibility, HUD, framing, artifacts, and blank regions")
4

Assert state

browser(action="evaluate", code="window.__GAME_DEBUG__?.snapshot()")
5

Replay interaction

Start control: document.querySelector('[data-game-action=start]')?.click()Keyboard: dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight' }))
6

Diagnose jointly

Read the screenshot and the state together against the symptom table below.
7

Loop on any issue

No iteration limit — loop until it is visually correct and playable.
Symptom-to-cause table, built into the prompt: The prompt’s closing instruction is blunt: do not ask “does this look right?” about something you can verify yourself. The user hired the expert to produce a working game, not to QA its work.

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)

A tenth directory, 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

Selects Phaser 3 (2D plus physics), adds data-game-action hooks, and verifies during playtest that jumps genuinely rise and fall and that falling genuinely restarts.
Selects vanilla Three.js; the work concentrates on camera control and collision.
Classic R3F territory. The debug projection gains fields like waveIndex and towerCount so wave logic can be asserted.
Tunneling is usually a fixed-timestep violation (principle 1) or a collider size mismatch.

Boundaries and failure modes

Known defect: three sprite scripts are placeholders

The three scripts under scripts/ currently only print a line of text — there is no real implementation: The symptom: calling them does not error. They “succeed” and return a line of text, but the sprite output you wanted never appears. Workaround: have the model process sprite sheets directly with Pillow (available in the sandbox), or follow the sprite-pipeline skill document manually. How to spot it: the model reports “sprite preview sheet generated” but no image file exists.

Verify

1

Confirm activation

Ask “can you build browser games? Which engine would you use?” When active, the expert produces the selection matrix and asks about your game type; when inactive it just offers to write code.
2

Minimal playable

“Make the simplest thing: a square that moves with arrow keys and stops at the edges.” You should get something immediately playable, not code for you to run.
3

Confirm the debug projection exists

In the game page console, run 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.
4

Confirm the self-check loop ran

Look for screenshot and evaluate calls before delivery. Handing you raw code instead usually means the browser tool was not bound.

3D development

Blender / Godot bridges and the 3D asset pipeline

Visualize

The inspect_3d Three.js scene diagnostic tool

Browser automation

The browser capability the playtest loop depends on

Sites

Publishing the finished game as a reachable site
Verified 2026-08-11. Sources: services/agent-runtime/src/plugins/builtin/game-studio/plugin.json, prompts/GAME_STUDIO.md, references/{engine-selection,playtest-checklist}.md, scripts/*.py.