Skip to content

0023. Content packs, pack loader, approval queue, fork/remix

  • Status: Accepted 2026-11-29 (Phase 4b; owner decisions 2026-11-29: the loader prefixes pack ids, an automatic Expansions menu, forks copy the live release only, anyone 13+ submits and the game owner approves)
  • Date: 2026-11-29
  • Phase: 4

ADR 0015 fixed the shape: packs are data and media only, publishers choose per game whether expansions and forks/remixes are allowed, every pack version goes through the publisher’s queue, and lineage is immutable. Phase 4b makes it work end to end: building packs, loading them into a game at runtime, approving them, letting players turn them on, and forking games.

  • Packs are workspaces. A pack is a game row with kind = 'pack' and targetGameId, so drafts, commits, branches, the editor (including the level editor), the assistant, MCP and the agent tools work unchanged. A pack’s files: pack.json (content-pack document) plus levels/, scenes/, prefabs/ and assets/. Uploading a zip of the same layout also works (pnpm platform publish).
  • Submitting a pack version runs a pack check in the worker (data only, no code, so no builder): the pack and each document are validated, then merged into the target game’s live release with the loader and the whole project is validated (unknown prefabs, scenes and levels are reported with pack file paths). The pack’s files are stored under packs/<versionId>/; the version waits in the game owner’s queue.
  • Namespacing (loader prefixes). applyPacks(files, packs) in the framework renames every id a pack defines (scenes, levels, prefabs, items, asset keys, bundles) to <packId>:<id> and rewrites the pack’s references: a reference resolves to the pack’s own id first, otherwise to the base game’s (so packs use player, coin, title unprefixed). Known reference fields are rewritten by schema position; string values inside component data are rewritten when they equal an id the pack defines. : is reserved: ids may contain it only as <packId>:<id>. Packs never replace base content.
  • Reaching pack content. The framework adds an Expansions item to the entry scene’s menu, opening a generated menu scene (packs:menu) with each enabled pack’s start scenes (contents.start, default the first scene). Publishers can turn the item off (permissions.expansions.menu: false) and open packs:menu from their own menus or rules instead.
  • Approval queue. Any signed-in user can submit to a game whose manifest allows expansions; the version is pending until the owner approves or rejects it (with a reason, shown to the creator). Approved versions are what players see; the newest approved version of a pack is the live one. Platform moderators can remove packs through the existing reports and moderation tools.
  • Players opt in. The game page lists approved packs with a toggle per pack. Choices are kept per account (pack_choice), and in the browser for signed-out players. The page passes the enabled pack versions to the game (?packs=<versionId>,...); the play server serves /p/<versionId>/... only on the target game’s host and only for approved versions, under the same CSP as games.
  • Fork/remix. Allowed when the parent’s permissions.remix is fork (private copy with attribution, cannot be published) or remix (may be published as a new game). The new game starts with one commit holding the source of the parent’s live release (no history, no drafts); parentGameId, parentVersionId and attribution are set once and shown on the game page with a link to the parent.
  • Authors write prefixed ids: a simpler loader, but more to get wrong for creators and the AI.
  • Building a combined bundle per (game, pack set): exact but a build per combination; runtime merging is enough because packs are data.
  • Copying full history on fork: exposes unpublished work.
  • Packs can only use what the game exposes as data (ADR 0015); behaviours stay the publisher’s.
  • A string in component data that equals a pack-defined id is treated as a reference to it (documented).
  • A new base release can break approved packs. Packs are checked against the live release when they are submitted; if a pack fails to load or breaks the game at start, the game starts without packs. target.gameVersion is recorded but not enforced yet.
  • Pending versions are served on the target game’s host so its owner can try them; version ids are unguessable.
  • Packs get no AI-specific tools yet; the agent tools work on game folders (game/).