Skip to content

MapPlayOptions beta ​

Interface of @v12-engine/client/app

ts
export interface MapPlayOptions

What a game says of playing a map of its own made in the editor (see mapPlayScene)

Members ​

editor ​

ts
editor?: string;

The editor scene to go back to, from the debug panel. None when left out

id ​

ts
id: string;

The scene's id: what the game's editor scene names as its play

name ​

ts
name: string;

What the scene is called in the list of scenes

onStart ​

ts
onStart?: (world: World, context: {
        map: GameMap;
        player: PlayerId;
    }) => void | Promise<void>;

What the game does once the world is made, and before anyone plays: computer players, a mission given, the first wave sent. Nothing when left out

player ​

ts
player?: (map: GameMap) => PlayerId;

Who the player at the screen is. The first player with a start when left out, or the first player of the map when none has one: a game that has its players decide nothing of the kind, a tower defense, says

rules ​

ts
rules: Rules;

The game's rules the map is played by

saves ​

ts
saves?: boolean | NonNullable<GameScene['saves']>;

Whether it is saved and loaded from the HUD: a save opens the scene again from it, and the world is loaded as it was, with the game's afterLoad (where it seats its computer players again, say), not start. name is what a save is called, autosave how it saves by itself (AutosaveOptions). No saving when left out

view ​

ts
view: GameView;

The game's view that draws the map