AI-built games are not black boxes. Every bundle is a frozen React component tree + custom widgets + scoped CSS that you can inspect, edit, and republish from the studio. This guide walks through editing a generated bundle end-to-end. forking someone else's AI-built game, rerolling failed judge tracks, swapping the entry component, and shipping your fork.AI-built games are not black boxes. Every bundle is a frozen React component tree + custom widgets + scoped CSS that you can inspect, edit, and republish from the studio. This guide walks through editing a generated bundle end-to-end. forking someone else's AI-built game, rerolling failed judge tracks, swapping the entry component, and shipping your fork.
#Opening an AI-built game in the studio
From the play lobby of any AI-built world you own, click Edit World to enter the studio. Navigate to the AI Codegen section in the left sidebar — it sits alongside the standard World / Characters / Mechanics sections. This is the panel that doesn't exist for templated games. it only shows up for families whose blueprints route through the codegen loop (currently arcade).
The AI Codegen panel has three tabs:
- Bundle. The current finalized component tree + custom widgets + style scope. Read-only view of what the runtime mounts.
- Iterations. Every GenerateEntryComponent call the agent made, with its judge verdicts inline. Shows you why a given iteration was kept or discarded.
- Tracks. The full track table for this blueprint — every track's current verdict, the judge's reasoning, and a "regenerate" button per RED/YELLOW track.
If the panel is empty, the codegen loop hasn't run yet. Click Build with AI in the top-right of the studio to kick it off. The build runs in the background. expect 30 seconds to 2 minutes for arcade bundles depending on iteration count.
#Reading the iteration log
Each iteration in the Iterations tab shows:
- Iteration number + timestamp.
- Prompt the agent received (with the patch hint from the prior iteration if applicable).
- Generated entry component source (collapsed by default). Click to expand the full TSX.
- Compile result — green checkmark or red error list.
- Judge verdicts per track, color-coded.
- Decision — what the agent chose next: regenerate / re-test / finalize / stop on budget.
The agent is allowed up to 8 iterations by default. Most arcade bundles finalize in 2-4. If you see an iteration count of 8 with a partial finalize, the agent hit its step budget; some tracks may be YELLOW or RED.
To replay a specific iteration: click "Promote to current" on any historical iteration. The runtime rolls back to that revision. Useful when iteration 5 looks better than iteration 7 but the agent picked 7 because more tracks went GREEN — your eyes can disagree with the judge.
#Rerolling a track
In the Tracks tab, every YELLOW or RED row has a Regenerate button. This kicks off a fresh codegen iteration targeted at that specific track. The agent gets a patch hint like "the previous bundle failed combat_juice_present — add screen shake, particle burst, or damage popups on hit frames." It can:
- Regenerate the entry component with the fix.
- Regenerate just a custom widget (cheaper, faster).
- Add a new custom widget if the existing tree doesn't have one for the failing track.
The regenerated bundle is added as a new iteration. You can promote it or keep the prior one — your call.
Cost: each regenerate runs a fresh agent loop step, typically $0.02-0.08. The studio shows running cost in the top-right.
#Editing the component tree manually
The codegen loop produces a ComponentNode tree (<ArcadeGame> root + nested widgets). The Bundle tab has a JSON view showing this tree. You can:
- Move nodes. Drag a widget to a new position in the tree. Useful for layering — e.g. move
<ParticleBurst2D>above the HUD so explosions show through. - Edit props. Click a node to inspect its props in the right sidebar. Numeric fields are sliders; string fields are dropdowns where the type is constrained (biome ids, weather modes, bullet patterns).
- Remove nodes. Delete a widget you don't want. If a launch-blocking track depends on it (e.g. removing
<ScreenShake2D>may breakcombat_juice_present), the studio warns before deleting. - Insert primitives. "Add component" opens the primitive library picker. Pick any of the 14 families and the studio inserts a default-configured instance.
Edits are saved as a draft. publish from the top-right when ready. Drafts persist across sessions.
#Adding custom TSX widgets
The Custom Widgets sub-panel under Bundle lists every bespoke TSX widget the agent generated. Each widget has:
- Name. PascalCase identifier referenced from the component tree.
- Intent. The natural-language description the agent received when generating it.
- Source. The TSX itself (read-only by default; click "Edit" to switch to a Monaco editor).
- Bundle JS. The compiled output, with a green checkmark or compile-error list.
- Warnings. Anything the compiler flagged.
To add your own custom widget:
- Click Generate widget in the sub-panel header.
- Fill in the Name (PascalCase) and Intent (1-2 sentences describing what it should do).
- The agent generates the TSX, compiles it, and adds it to the bundle.
- Reference it from the component tree via "Add component" → "Custom widgets" → pick your widget.
To edit an agent-generated widget by hand:
- Click Edit next to the widget.
- The TSX opens in Monaco with the
@wilds/component-sdktypes and@wilds/game-primitives/*imports auto-completed. - Save — the compiler runs on every save. Errors show inline.
- Once it compiles, the new bundle JS replaces the old one.
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. This is enforced by the esbuild config in the studio sandbox.
#Editing the style scope
The Style Scope sub-panel holds a per-game SCSS module. The agent generates default styles based on the blueprint's art style; you can extend or override them.
- Click Edit SCSS to open Monaco with the existing module.
- SCSS variables and nested selectors work as normal.
- The compiler runs sass on save. Errors show inline.
- Compiled CSS is scoped to a
[data-game-id="<blueprint-id>"]wrapper, so it can't leak outside your game.
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.
#Forking an AI-built game
To duplicate someone else's AI-built game into your account:
- Open the play lobby of their world.
- Click Fork in the top-right. (Only visible if the world is public.)
- wilds.ai creates a new blueprint owned by you, copying:
- The world config (prompt, genres, biome, art style).
- The finalized AI-built bundle (entry component + custom widgets + style scope).
- The asset bindings (sprites, audio, etc.) where the license permits.
- You land in your fork's studio with a fresh draft.
From there, every edit above applies — reroll tracks, edit widgets, swap primitives. Your fork is a new revision history starting at the parent's finalize point. The original creator's credits and prompts are visible in the "Forked from" badge on your lobby.
#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
Visibilityis set to public, the new revision shows up in Explore. - Re-publishing creates a new revision each time. The version history is preserved; you can roll back with the Revert to prior button in the AI-build panel, which shows how many prior revisions are available.
Published worlds with community_remix: 'allow_forks' in their visibility config (the default for public worlds) can be forked by anyone. Set this to private if you want to keep your bundle from being copied.
#Common gotchas
- YELLOW launch-blocking track after edits. If you remove a primitive that a launch-blocking track depended on (e.g. delete
<ScreenShake2D>andcombat_juice_presentwas your only juice signal), the bundle won't republish. Add a replacement or reroll the track. - Custom widget references a removed primitive. If you edit a custom widget to remove an import that another widget depended on, the dependent widget's bundle JS goes stale. The studio's dependency-graph view (Bundle → Dependencies tab) shows you which widgets import what.
- Style scope override fights the primitive's internal styles. Primitives from
@wilds/game-primitives/*ship with their own CSS modules. Your style scope can't override those (selector specificity is too low). To customize a primitive's look, fork it (advanced — clone the primitive source into a custom widget). - Edits don't survive a full regenerate. "Build with AI" without targeting a specific track wipes the current bundle and rebuilds from scratch. The track-targeted Regenerate keeps your edits and just patches one widget. Use the targeted variant unless you want a clean slate.
- 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.
#What you can't edit (yet)
- 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 vibe-code closer to your vision on first build
- Editing worlds in the creator studio — every panel, including the standard non-codegen ones
The studio for AI-built games is the most directly hackable surface on wilds.ai. Read your bundle, edit it, fork it, publish. The agent did the first pass — the customization is yours.