GameDescriptor
A game as defineGame made it: its options, each with its default, and
the composition of its plugins, made once. Game mounts it, and the
room, simulate, the save file, replay and the bundle load it as the
game export of src/game.ts.
Properties
Section titled “Properties”| Property | Modifier | Type | Description |
|---|---|---|---|
[gameBrand] |
readonly |
true |
- |
composition |
readonly |
Composition |
What the plugins compose to, around the core. |
deposits |
readonly |
GameDeposits |
Each record’s deposit hooks, as the game gave them. |
levels |
readonly |
Readonly<Record<string, string>> | undefined |
- |
name |
readonly |
string |
- |
omit |
readonly |
readonly ReplaceableHandle[] |
- |
physics |
readonly |
PhysicsSettings |
- |
playerState |
readonly |
PlayerStateDeclaration | undefined |
The game’s own state in the player’s game-wide record, or none. |
playerWorldState |
readonly |
PlayerWorldStateDeclaration | undefined |
The game’s own state in the player’s record in each world, or none. |
plugins |
readonly |
readonly Plugin<Readonly<Record<string, SystemHandle<"input" | "rules" | "motion" | "physics", boolean, RunContext>>>, Readonly<Record<string, ButtonInputDeclaration | AxisInputDeclaration | VectorInputDeclaration | AngleInputDeclaration>>, Readonly<Record<string, PageActionDeclaration>>, string, Readonly<Record<string, CommandDeclaration<Readonly<Record<string, CommandField>>, string, Readonly<Record<string, ReturnField>> | undefined, boolean, boolean, boolean, boolean>>>, Readonly<Record<string, InputContextDeclaration>>, Readonly<Record<string, SaveHandle<"player" | "world" | "entity">>>>[] |
- |
room |
readonly |
RoomSettings | undefined |
The game’s room, as defineRoom made it; undefined for a game played alone. |
saves |
readonly |
CoreSavesOption |
The core’s saves as the game overrides them: false, or by name. |
start |
readonly |
string |
- |
textureSeed |
readonly |
number |
The seed every pixel texture paints from. |
tickRate |
readonly |
30 | 60 |
The ticks a second the game’s world steps at where nothing overrides it: its room’s tickRate, 30 where the room names none, or a game played alone’s own, 60 where it names none. A room’s start may run that room at another rate, so a system reads its world’s rate with readTickRate, never this. |
worlds |
readonly |
WorldsOptions | undefined |
The worlds the game keeps, their settings as declared, {} for true; undefined for a game that declares none. |
worldSaves |
readonly |
WorldSavesDeclaration |
The world’s per-entity saves by name, {} for none. |
worldState |
readonly |
WorldStateDeclaration | undefined |
The world’s own state in the world’s record, or none. |