Skip to content

GameSceneOptions beta ​

Interface of @v12-engine/client/app

ts
export interface GameSceneOptions extends Omit<GamePlayOptions, 'map' | 'editing' | 'generated' | 'from' | 'environment'>

What a scene of a game is made with (gameScene): what a game is played with, as launch takes it (GamePlayOptions: where the game comes from, its name, its look, its files, its screens), and what the scene says of itself

Members ​

environment ​

ts
environment?: string | MapEnvironment;

A look to play the map with, over its own: one of the game's by name (GameView.world.environments) or one given whole. Its parts of a look replace the map's (withEnvironment); the map's sounds and grounds stay

exit ​

ts
exit?: GameScene['exit'];

Where the HUD's button out of the game goes: a menu of the game's. The list of scenes when left out

id ​

ts
id: string;

The scene's id, by which the app and goTo open it

map ​

ts
map?: GameMap | ((args: SceneArgs) => GameMap | Promise<GameMap>);

A map of the game, or what makes one each time the scene is opened, with what the scene was opened with: the world is made from it with the game's rules. A scene opened with SceneArgs.generated makes that map with the game's generator in its place. A promise where the map is fetched as the scene opens (LazyMaps)

replays ​

ts
replays?: GameScene['replays'];

Where games played here are saved as replays and listed, as GameScene.replays takes it

saves ​

ts
saves?: GameScene['saves'];

Where the player's saved games are kept and listed, as GameScene.saves takes it

transition ​

ts
transition?: GameScene['transition'];

How it comes in over the scene before (SceneTransition): as the app says when left out