AI-built games are not black boxes. Every bundle is a React entry component, a game script, a stylesheet, lifecycle hooks and custom components that you can read, change and republish from the studio. This guide walks through reading the build, rerunning it, asking for changes, and editing the code by hand.
#Opening an AI-built game in the studio
From the play lobby of an AI-built world you own, click Edit World to enter the studio. An AI-built game adds three panels to the Mechanics section of the left sidebar, Iterate, Code and Hooks, and fills the Vibe Loop tab of the right sidebar. A game without a generated bundle shows none of them. The eight families that build one are listed in AI-built games.
#Reading the build: the Vibe Loop tab
The Vibe Loop tab records the game's last build:
- Game architecture: how the agent laid the game out.
- Loop summary: why the loop stopped (exit), its cost, how long it ran, the bundle revision, and the custom components it wrote.
- Tracks: one chip per judge track with its verdict (GREEN, YELLOW or RED) and the judge's reason.
- Iterations: every step the agent took, in order.
If the agent ran out of steps before every launch-blocking track went GREEN, it keeps what it built; some tracks stay YELLOW or RED.
#Rerunning the build
Three controls under Re-run controls in the Vibe Loop tab:
- Polish this game runs the whole loop again.
- Re-iterate stuck tracks runs the loop only on the tracks that are YELLOW or RED, for 20% of a full run's credits. It reads "(none)" and is disabled when no track is stuck.
- Revert to prior goes back to the previous bundle revision, free. The button shows how many prior revisions there are.
#Asking for a change: the Iterate panel
Iterate is a chat over the game's source. Describe a change ("make the boss telegraph its charge for a full second") and press Send or Cmd/Ctrl+Enter. Each message runs one edit: the model changes the source, the change is compiled, and the draft is saved. The reply explains the change, names the files it touched and lists any compile errors. The credit cost of an edit shows beside Send.
The conversation keeps going, each turn editing the same source, until you press New. Past conversations stay in the list at the top, so you can pick one up again. Open the Code panel to see the result.
#Editing the code: the Code panel
Code opens the bundle in a code editor, one file at a time: entry (the top-level React component the runtime mounts), gameScript, styles, hooks, and each custom component. Save writes your change to the draft; Preview builds the game in a sandbox and renders it inline. Compile errors show under the editor.
To add a custom component, add it by name in the file list. Names are PascalCase identifiers, such as BossBar.
The compile sandbox imports only the documented primitive packages plus @wilds/component-sdk hooks. Imports from outside this set fail at compile time. No fetch, no async, no DOM access outside the returned JSX, no eval.
#Lifecycle hooks: the Hooks panel
Hooks lists the lifecycle events the game's family supports: onSessionStart, onSessionEnd, onLevelEnter, onLevelExit, onCutsceneStart and onCutsceneEnd. Pick one to edit that hook's function body. Test fires the event in a preview build and lists what the hook dispatched. Save hooks writes them to the draft; the Code panel's hooks file holds the same module.
#Editing the style scope
Each AI-built game carries one SCSS stylesheet: the styles file in the studio's Code panel. The agent generates default styles based on the blueprint's art style; you can extend or override them in the editor.
- SCSS variables and nested selectors work as normal.
- Every rule is scoped under
.game-root, the class on the game's mount root inside its own sandboxed frame, so it can't style anything outside your game. Rules led byhtml,bodyor:rootstay as written: the frame is the game's own document. - A transparent text fill (
-webkit-text-fill-color: transparent, the gradient-text effect) on a layout container the entry renders, such as thedivthat holds a menu, compiles tocurrentColor, so the container's buttons and labels stay readable. Text elements and pseudo-elements keep the effect. - Preview compiles the stylesheet the way Save does and renders the game with it. A stylesheet that does not compile shows as a
styles:error under the editor, and the preview renders unstyled; Save refuses it until it compiles. - The stylesheet has limits, the same for Save, Preview and the build loop: at most 50,000 characters of SCSS (the cap the loop puts on the stylesheet it writes), a compile that finishes within 10 seconds, and at most 1,000,000 characters of compiled CSS. A
@whileor@forthat never ends, a mixin or function that recurses without end, or a loop that grows the stylesheet without end is refused at the limit, and the compile runs apart from the server's request handling, so a stylesheet that would never finish holds nothing else up. The server compiles two stylesheets at a time: a compile that arrives while two are running waits its turn (up to eight wait), its 10 seconds counted from when it starts, and a compile beyond those is refused with astyles:line asking to try again in a moment. Each refusal shows as astyles:error under the editor, like a syntax error: Save refuses the stylesheet and Preview renders the game unstyled. - Preview uploads the compiled files to storage. When the stylesheet or the hooks cannot be uploaded, the preview still renders, unstyled or without hooks, and a
styles:orhooks:line under the editor says so. When the entry cannot be uploaded, no preview renders and apreview:line says so. A Preview, Save or compile request that does not complete (the connection dropped, the server did not answer) shows a line under the editor as well; the draft is unchanged, and the button works again.
If a palette_coheres track is YELLOW, the most common fix is editing the style scope to add explicit color variables. The agent will pick those up on next regenerate if you mark the track for re-roll.
#Remixing and AI-built games
An AI-built arcade, platformer, roguelike, survival, realtime-3D or strategy game cannot be remixed, by anyone: the generated bundle is the game, and a remix rerolls a world's premise, regions and characters, which these games do not use. The Remix button does not appear on them. To try a different direction on your own game, use Iterate or Re-iterate stuck tracks, and Revert to prior to step back. See Remixing.
#Publishing your edits
Once you're happy with the bundle:
- Click Publish in the top-right of the studio.
- The current draft is frozen as a new revision. The runtime serves the new revision on the next session.
- If the world's visibility is public, the new revision shows up in Explore.
- Re-publishing creates a new revision each time. The version history is preserved; Revert to prior in the Vibe Loop tab rolls back and shows how many prior revisions are available.
#Common gotchas
- A launch-blocking track goes YELLOW after an edit. If you remove what a launch-blocking track depended on (delete the screen shake and
combat_juice_presentloses its only juice signal), add a replacement or run Re-iterate stuck tracks. - Style scope override fights the primitive's internal styles. Primitives from
@wilds/game-primitives/*ship with their own CSS modules, and your style scope can't override those (selector specificity is too low). To change a primitive's look, write your own custom component. - Free-plan assets publish to the public catalog. Assets generated for your game (sprites, music, SFX, voices) are tagged and saved to the shared catalog on the Free plan. Paid plans get privacy toggles: per asset, per game (Asset Browser or Settings panel), or account-wide in Settings.
#Limits
- The agent's tool catalog. You can't add new tools (e.g. "generate a multiplayer protocol"). The codegen agent is gated to the shipped tool surface.
- The judge prompt. Track contracts are global. If you disagree with how
combat_juice_presentscores your bundle, file feedback rather than rewriting the contract. - Cross-revision draft history. Drafts are flat per blueprint. There's no "branch" concept: you have one in-progress edit at a time.
#See also
- AI-built games — how the codegen loop and primitive library work
- Writing great prompts — make the agent build closer to your vision on first build
- Editing worlds in the creator studio — the studio's sections and panels, including the standard non-codegen ones