Iterating with the agent
The refinement loop — how to chat, screenshot, undo, and steer.
The first build of a game is rarely the final one. Most of the work happens in iteration: nudging, retuning, fixing, polishing. This page is the loop.
The shape of a turn
A turn starts when you send a prompt and ends when the agent says
Done and the preview reloads. During a turn:
- The chat input is disabled (placeholder reads
Agent is working…). - The publish badge shows
AI generating(blue). - The activity strip shows the agent's tool calls in monospace.
You can still:
- Read activity / chat history.
- Switch tabs in the left panel.
- Drag the resize handle between chat and preview.
You cannot:
- Send a new prompt (queued isn't supported; one turn at a time).
- Edit in the canvas (Edit mode is unavailable during a turn).
Three styles of iteration
Pure chat
The fastest loop:
Player feels too slippery. Reduce horizontal acceleration so it
stops more snappily — about half the current "skid distance".The agent reads the current code, finds the relevant value, makes the change, rebuilds. ~30–60s.
Chat + screenshot
When words can't pinpoint what you mean, screenshot.
- Click 📷 Screenshot in the preview toolbar (or any screenshot tool).
- A modal appears with Send to agent / Download / Discard.
- Pick Send to agent. The screenshot lands in the chat input as an attachment.
- Add a one-line caption:
"The coin counter is overlapping the player area — move it up out of gameplay space."
Direct manipulation (Edit mode)
Some things are faster done with hands than words.
- Click Edit in the toolbar.
- Drag the player sprite to a new spawn point. Drag coins to new spots. Resize the tilemap. Tune values in the Inspector.
- Cmd+S, or click Play, to commit.
The agent watches Edit-mode changes as commits. If you then chat
"Now make all the coins twice as common", it sees the new layout you
made by hand and adapts.
More: The editor.
Undo and redo
In Edit mode:
- Cmd+Z undoes the last entity-edit command.
- Cmd+Shift+Z (or Cmd+Y) redoes.
- The Inspector's per-field changes are individual undo steps.
In chat:
- No literal undo. Instead, use Change history
to see every agent turn as a commit, and tell the agent which one to
revert to:
"Roll back to the state right after the coin-pickup turn yesterday."
The Ask AI bar (entity-scoped prompts)
When an entity is selected in Edit mode, the Float Inspector includes an Ask AI textarea at the top. Prompts you type there are scoped to that entity — the agent receives the entity's id, kind, transform, visual, and properties as context.
Use this for changes that are local to one thing:
[Wizard entity selected]
Make this character do a small jump animation on coin pickup.vs. the full chat panel for changes that touch multiple entities or rules.
When to commit a refactor
Sometimes you'll want a substantial reorganization — converting from scene-as-code to scene-as-data, adding a foundation skill the agent didn't use, extracting repeated logic into a prefab. Two patterns:
- One big prompt. Describe the refactor scope clearly and let the agent do it in one turn. Higher credit cost (40–80), but coherent.
- Step-by-step. Smaller prompts each making one change. Easier to undo a specific step, harder to keep the whole picture in your head.
If the agent gets stuck mid-refactor (build fails twice in a row, code ends up in a weird state), use Change history to roll back to the last known-good commit and try again with a different prompt strategy.
Bug reports vs. feature requests
Both work, but be explicit about which one:
- "It's broken: [thing] doesn't happen / happens wrong." → bug report. The agent will treat this as a fix, not a change.
- "Change behavior so [thing] now does [other thing]." → feature request.
Mixing the two in one prompt sometimes confuses the agent. If your prompt contains both a complaint and a new request, split it.
Watch the activity strip
The strip above the chat input shows what the agent is doing right now. If it's been stuck on the same line for >30 seconds, the agent may have hit something hard. Check the chat — sometimes it'll surface a question or report a problem. If it's silent for >2 minutes, refresh the page; the session server will resume the turn where it left off.
Stop / abandon a turn
There's no hard "stop the agent" button. Two soft options:
- Close the tab. The turn aborts; the session is freed; on reconnect you'll see the last activity line.
- Wait for it to finish, then revert via Change history.