Skip to content

The studio ​

The studio (?studio=<draft> in the web client; Open in the studio from a creation's answer or from Your games) is where a creator fine-tunes a game by hand: the city on a map, its missions in forms, the game's settings, the catalogue, the build and publishing. It writes the same draft as the chat on the creation page and Claude Code with the MCP server, through the same API, so what one writes the others read. The code is apps/client/src/ui/studio/ (its page is StudioPage.tsx); Creating games tours every tool and key.

Starting ​

?studio with no draft starts one, under the title given:

  • A new city: the catalogue's large city (a kilometre a side, every capability on), drawn freely.
  • From a curated city (the creation page's picker, GET /catalogue/cities): Edit its city starts a draft on its city spec, to draw on; Keep it as it ships starts one on its level as it ships, for its missions alone (the map draws its roads under the zones).

The tabs ​

TabWhat it holds
InspectorThe element selected on the map, as its schema's form: every field with its words, its points one by one, what names it.
LayersEvery element of the level under its kind, with the issues about it: selected, hidden from the map, deleted.
IssuesWhat the solver (as you draw) and the last save or build found, numbered and pinned on the map, each with its quick fixes, Fix with AI, and Explain.
JSONThe whole level spec in a code editor (advanced: anything the schema takes).
GameThe whole game document in a code editor (advanced).
SettingsThe game's own settings as a form: its title (the draft's name), its blurb, how it is played (rules.mode), police, traffic, where a player comes back, the players a room takes, the loadout, its places.
MissionsIts missions, each in a form: its id, title, blurb, how it is played (solo, co-op or versus, unless the game's mode says for all), its start, objectives, actors, rules; its zones.
CatalogueThe catalogue searched as catalogue_search searches it: a building made a landmark of the district selected, a prop taken in hand by the Park thing tool; anything else shown with its example.
BuildBuild, how it went, its preview, Look round, Playtest; then Publish and Open a room.

A draft on a level that ships has no level spec: its tabs are Missions, Settings, Game, Issues, Catalogue and Build.

Nothing is stuck ​

Every layer can be deleted: a road others end on, a hill a road climbs, the spawn, the last district of a city or of a grid town. What that leaves missing is an issue, with a fix:

  • No spawn (spawn-missing): Put the spawn on street, the longest street of the town (30 m at least); with no road at all, the issue says to draw one first. A spawn on a road that is gone, on a roundabout's arc or a road up a hill (spawn-no-road), or on a street too short for the four spawns (spawn-short), is moved the same way.
  • No district (district-missing): Add a district (a city's in the midtown style by its first street; a grid town's takes every block).
  • A road deleted takes along what named it: the spawn on it moves to the first street left (or goes, with no street left), a place along it stays where it stood, as coordinates.

Saving with issues ​

Save (Ctrl+S) writes the spec and the game for the revision they were read at, issues and all: PUT /drafts/:id/spec stores any spec that matches its schema and answers with its issues. So a creator who deletes a layer on the way to another, or leaves a fix for tomorrow, never has only Undo. What the issues keep from happening is the build: POST /drafts/:id/build refuses a spec with issues (400, reason: spec-issues, the issues listed), so publishing waits too. A spec that does not match its schema (a size that is not a number) is still refused, with its issues at their paths.

Issues and their fixes ​

The city solver gives each issue a code, where it is (at) and what a fix needs (data), and the studio offers its quick fixes, each one click and one step to undo:

CodeFixes
bend-tightEase the bend, smooth it, delete its point, cut the stretch out, make the road a narrower class.
road-shortLengthen it (its own ends pushed apart), or delete it.
road-off-map, point-off-mapPull it inside the map, or grow the map.
junctions-nearMove a road's end apart along the road, or delete a road meeting there.
arms-sharpTurn the arm away from the other road.
end-gapEnd it on the road it stops short of.
end-in-river, junction-in-river, runs-in-riverMove it off the water, out past its nearer bank.
bank-shallowCross the river square: two points across it on the river's normal.
pavement-nearMove the road away from the other, whole, until a pavement fits.
hill-streetTunnel under the hill, or delete the hill.
climb-steepLower the hill it climbs; a street over the town's relief: put it in a tunnel.
spawn-missing, spawn-no-road, spawn-shortPut the spawn on the longest street.
district-missingAdd a district.

Every issue about an element also offers to delete it, and Explain says what its rule is and how to mend it by hand.

Autofix ​

Where creation is open to the owner (/me's creation.available), every issue has Fix with AI, and the Issues tab Fix all with AI. The studio saves first, then asks the platform's model (POST /drafts/:id/fix {issues, ifRevision}):

  • The conversation on the draft hears the issues as its next turn when one waits for its owner; else a creation revising the draft starts (revise, the game's mode). The brief is the platform's own: the issues numbered, each with its path, code and data, and what to do (mend only them, set the spec again until it answers no issue, say what changed in plain words).
  • It spends, is budgeted and is moderated as a message or a brief is: a turn of the creation's FireTokens, or a creation of the day's.
  • While the model works, the studio only shows the draft and says "The AI is fixing 2 issues…". It asks how the creation goes every second and a half; once its turn is over it loads the new revision and shows what the model said, in plain words.

POST /drafts/:id/fix without issues sends every issue the stored spec has; the MCP server's draft_fix tool is the same call for Claude Code.

Publishing, deleting, renaming ​

  • Publish (the Build tab, once the draft as saved has built with no error): by link, or publicly (listed, its texts moderated), as draft_publish does. Then Its page and Open a room (as room_open: a room of the published game, joined at once).
  • Delete (the header) deletes the draft after a confirmation, as Your games does (DELETE /drafts/:id), and goes back to Your games.
  • Rename: the Settings tab's title is the game's title, the draft's name in every list.

Only through chat or MCP ​

The studio does what the API and the MCP server do for a draft, with these exceptions:

  • Remixing someone else's published game: that is Remix on its game page (?game=<id>), or game_remix; the studio then edits the draft it makes.
  • The guides and the schemas as resources (foi://guide/…, foi://schemas/…): the studio shows a field's words from its schema and Explain's rules, but the whole guides are read in the docs, the chat's model and Claude Code.
  • Grid-town and region levels: a draft that is one keeps being edited here, on its own map, but a new one is made only by an admin or with FOI_DEBUG (for the test levels), through the API or the MCP server; the studio starts cities.