Top-level fields of each game document (full JSON Schemas: packages/schema/json/), then every action that
scene rules and menu items can run. Generated from the Zod schemas (pnpm docs:llms).
Root document of a game (game.json).
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
title |
string | object |
yes |
|
Plain string, or a map of locale → string. |
description |
string | object |
|
|
Plain string, or a map of locale → string. |
version |
string |
yes |
|
Semantic version, e.g. 1.4.0. |
engine |
object |
yes |
|
Framework version range. |
genre |
“platformer” | “top-down” | “arcade” | “puzzle” | “racing” | “shooter” | “ |
|
|
|
tags |
string[] |
|
|
|
authors |
object[] |
|
|
|
defaultLocale |
string |
|
"en" |
|
display |
object |
yes |
|
|
simulation |
object |
|
|
|
physics |
object |
|
|
|
input |
object |
yes |
|
|
ui |
object |
|
|
Game-wide look of text and menus. |
assets |
object |
|
|
Asset bundles by id. |
prefabs |
string[] |
|
|
Paths to prefab JSON files. |
items |
object[] |
|
|
Things players can carry (inventory). |
dialogues |
string[] |
|
|
Paths to dialogue files. |
quests |
string[] |
|
|
Paths to quest files. |
brains |
string[] |
|
|
Paths to NPC brain files (state machines, behaviour trees). |
localization |
object |
|
|
String tables: ‘@key’ in any text field shows the player’s language. |
scenes |
object[] |
yes |
|
|
entryScene |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
behaviors |
string[] |
|
|
Code behaviours/systems this game registers and lets data reference. |
touch |
object |
|
|
On-screen controls for touch screens (shown on phones and tablets, or with ‘?touch’). |
multiplayer |
object |
|
|
Online play (ADR 0027): rooms of signed-in players; every browser steps the same match in lockstep. |
leaderboards |
object[] |
|
|
Boards the platform keeps (best score per player); a game submits with ‘submitScore’. |
achievements |
object[] |
|
|
Achievements the platform shows on profiles; a game unlocks them with ‘unlockAchievement’. |
permissions |
object |
|
|
Publisher’s per-game choices for community extensions. |
monetization |
object |
|
|
Reserved for the monetization phase. |
lineage |
object |
|
|
Set by the platform on fork/remix. Read-only for creators. |
A scene: level, entities, systems, camera, background, music, HUD and rules.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
kind |
“gameplay” | “menu” | “cutscene” | “overlay” |
|
"gameplay" |
|
bundles |
string[] |
|
|
Asset bundle ids to load before the scene starts. |
level |
string |
|
|
Level file to load into this scene. |
level3d |
string |
|
|
3D games: a level3d file (pieces, objects, lights). |
world |
string |
|
|
Or a world file: chunk levels streamed around the camera (instead of level). |
camera |
object |
|
|
|
background |
object |
|
|
|
music |
object |
|
|
|
entities |
object[] |
|
|
|
systems |
string[] |
|
|
Registered system names to run in this scene, in order. |
hud |
object[] |
|
|
|
menu |
object |
|
|
A vertical menu navigated with the ‘uiUp’, ‘uiDown’ and ‘uiConfirm’ actions, mouse or touch. |
rules |
object[] |
|
|
Declarative event → action rules. |
waves |
object[] |
|
|
Arcade waves: timed groups entering from above the view. Emits ‘wave:’ and ‘waves:done’. |
properties |
object |
|
|
Free-form key/value properties. Values are primitives only. |
A tile-based level. Global tile id (gid) 0 means empty; tileset firstGid offsets map gids to tiles (Tiled-compatible).
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
name |
string | object |
|
|
Plain string, or a map of locale → string. |
orientation |
“orthogonal” |
|
"orthogonal" |
|
tileWidth |
integer |
yes |
|
|
tileHeight |
integer |
yes |
|
|
width |
integer |
yes |
|
Width in tiles. |
height |
integer |
yes |
|
Height in tiles. |
backgroundColor |
string |
|
|
CSS hex colour. |
tilesets |
object[] |
yes |
|
|
layers |
object | object[] |
yes |
|
|
properties |
object |
|
|
Free-form key/value properties. Values are primitives only. |
Entity template: a named bag of component values.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
extends |
string |
|
|
Parent prefab; its components are merged under these. |
components |
object |
yes |
|
Component name → component data, e.g. { “Transform”: { “x”: 0, “y”: 0 } }. |
tags |
string[] |
|
|
|
Community expansion: data and media only, never code.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
version |
string |
yes |
|
Semantic version, e.g. 1.4.0. |
title |
string | object |
yes |
|
Plain string, or a map of locale → string. |
description |
string | object |
|
|
Plain string, or a map of locale → string. |
authors |
object[] |
yes |
|
|
license |
string |
|
|
SPDX license identifier or expression, or ‘proprietary’. |
target |
object |
yes |
|
|
dependencies |
object[] |
|
|
|
contents |
object |
yes |
|
|
pricing |
object | object |
|
|
Reserved for the monetization phase; only ‘free’ is accepted until then. |
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
|
|
Major.minor version of the document schema. Loaders migrate older versions. |
kind |
“sound” |
yes |
|
|
wave |
“square” | “triangle” | “sine” | “saw” | “noise” |
|
"square" |
|
duty |
number |
|
0.5 |
Square wave pulse width. |
volume |
number |
|
0.5 |
|
attack |
number |
|
0.005 |
Seconds to reach full volume. |
decayPower |
number |
|
1 |
Fade-out curve after the attack: 1 = linear, 2+ = quick fall-off (plucky). |
lowpass |
number |
|
|
One-pole low-pass cutoff in Hz (softens noise). |
duration |
number |
yes |
|
|
frequency |
number |
yes |
|
Start pitch in Hz. |
slideTo |
number |
|
|
End pitch in Hz (exponential slide). |
arpeggio |
object |
|
|
Steps the pitch through these intervals (e.g. [0, 4, 7, 12] for a major arpeggio). |
vibrato |
object |
|
|
Pitch wobble: rate in Hz, depth in semitones. |
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
|
|
Major.minor version of the document schema. Loaders migrate older versions. |
kind |
“song” |
yes |
|
|
bpm |
number |
yes |
|
|
stepsPerBeat |
integer |
|
4 |
|
volume |
number |
|
0.6 |
|
tracks |
object[] |
yes |
|
|
A large map made of chunk levels on a grid, streamed around the camera.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
tileWidth |
integer |
yes |
|
|
tileHeight |
integer |
yes |
|
|
chunkWidth |
integer |
yes |
|
Width of every chunk level, in tiles. |
chunkHeight |
integer |
yes |
|
Height of every chunk level, in tiles. |
streamRadius |
integer |
|
1 |
Chunks loaded around the camera in each direction (1 = a 3×3 block). |
backgroundColor |
string |
|
|
CSS hex colour. |
chunks |
object[] |
yes |
|
|
A conversation: nodes of lines with optional choices, conditions and actions.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
start |
string |
yes |
|
First node. |
speakers |
object |
|
|
|
nodes |
object |
yes |
|
|
A quest: steps completed in order by events or conditions.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
title |
string | object |
yes |
|
Plain string, or a map of locale → string. |
description |
string | object |
|
|
Plain string, or a map of locale → string. |
steps |
object[] |
yes |
|
|
rewards |
object | object | object | object | object | object | object | object | |
|
|
Actions when the last step completes. |
How an NPC behaves: a state machine (states may run behaviour trees) or a behaviour tree.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
speed |
number |
|
40 |
Default walking speed, pixels per second. |
machine |
object |
|
|
A state machine. |
tree |
any |
|
|
A behaviour tree, ticked every step (when there is no machine). |
Strings of one language (game/locales/.json).
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
language |
string |
yes |
|
|
name |
string |
|
|
The language’s own name, e.g. ‘Français’. |
strings |
object |
yes |
|
Text by key; games write ‘@key’ in any text field. |
A 3D level: primitive pieces (boxes, ramps, cylinders, spheres), objects (prefabs, triggers, points), lights and sky.
| Field |
Type |
Required |
Default |
Description |
schemaVersion |
string |
yes |
|
Major.minor version of the document schema. Loaders migrate older versions. |
id |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
name |
string |
|
|
|
sky |
object |
|
|
|
lights |
object[] |
|
|
Default: a soft ambient light and a sun with shadows. |
killY |
number |
|
|
Entities below this height emit ‘:fell’ (falling off the world). |
pieces |
object[] |
|
[] |
|
objects |
object | object | object[] |
|
[] |
|
Each action is an object with action plus the fields below. Every action also accepts delayMs
(milliseconds, counted in fixed steps).
Leaves every scene on the stack (gameplay and overlays) and starts another.
| Field |
Type |
Required |
Default |
Description |
scene |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
transition |
“none” | “fade” |
|
|
Default ‘fade’. |
Opens a scene on top (pause menu); the one below freezes.
| Field |
Type |
Required |
Default |
Description |
scene |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
Closes the top scene (resume).
| Field |
Type |
Required |
Default |
Description |
sound |
string |
yes |
|
Asset key used at runtime, e.g. ‘player.sheet’. |
volume |
number |
|
|
|
| Field |
Type |
Required |
Default |
Description |
track |
string |
yes |
|
Asset key used at runtime, e.g. ‘player.sheet’. |
crossfadeMs |
integer |
|
|
|
| Field |
Type |
Required |
Default |
Description |
fadeMs |
integer |
|
|
|
| Field |
Type |
Required |
Default |
Description |
counter |
string |
yes |
|
|
amount |
number |
|
|
|
from |
string |
|
|
Add a bound value instead of ‘amount’, e.g. ‘game.coins’. |
scope |
“scene” | “session” |
|
"scene" |
‘scene’ state resets with the scene; ‘session’ state lasts until the game is closed (and is saved). |
| Field |
Type |
Required |
Default |
Description |
counter |
string |
yes |
|
|
value |
number |
yes |
|
|
scope |
“scene” | “session” |
|
"scene" |
‘scene’ state resets with the scene; ‘session’ state lasts until the game is closed (and is saved). |
| Field |
Type |
Required |
Default |
Description |
intensity |
number |
|
|
|
durationMs |
integer |
|
|
|
| Field |
Type |
Required |
Default |
Description |
event |
string |
yes |
|
|
Saves session state to the autosave slot.
Revives an entity at the last checkpoint (or where it started) with full health.
| Field |
Type |
Required |
Default |
Description |
entity |
string |
yes |
|
|
Changes component fields of a named entity, e.g. disable a controller.
| Field |
Type |
Required |
Default |
Description |
entity |
string |
yes |
|
|
component |
string |
yes |
|
|
values |
object |
yes |
|
|
Shows a centered message for a while.
| Field |
Type |
Required |
Default |
Description |
text |
string | object |
yes |
|
May include {bindings}, e.g. “Coins {game.coins}”. |
durationMs |
integer |
|
2000 |
|
size |
integer |
|
|
|
| Field |
Type |
Required |
Default |
Description |
setting |
“sound” | “music” |
yes |
|
|
Keeps the player’s best value (saved; cloud saves on the platform).
| Field |
Type |
Required |
Default |
Description |
value |
string |
yes |
|
Value path to keep the best of, e.g. ‘session.score’. |
key |
string |
yes |
|
Saved as the player’s best; bind it as ‘best.’. |
lower |
boolean |
|
false |
Lower is better (times). |
Sends a score to the platform’s leaderboard (signed-in players; checked by replaying the run).
| Field |
Type |
Required |
Default |
Description |
board |
string |
yes |
|
A leaderboard key from game.json ‘leaderboards’. |
value |
string |
yes |
|
Value path, e.g. ‘session.score’. |
Unlocks an achievement from game.json ‘achievements’ (once per player).
| Field |
Type |
Required |
Default |
Description |
achievement |
string |
yes |
|
|
Opens a dialogue (pauses play).
| Field |
Type |
Required |
Default |
Description |
dialogue |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
| Field |
Type |
Required |
Default |
Description |
item |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
count |
integer |
|
1 |
|
| Field |
Type |
Required |
Default |
Description |
item |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
count |
integer |
|
1 |
|
Runs the item’s ‘use’ actions.
| Field |
Type |
Required |
Default |
Description |
item |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
| Field |
Type |
Required |
Default |
Description |
quest |
string |
yes |
|
Stable identifier: lowercase letters, digits, ‘-’, ‘_’ or ‘.’, 1–64 chars. |
| Field |
Type |
Required |
Default |
Description |
language |
string |
yes |
|
A language code, or ‘next’ to cycle. |