Skip to content

TileDef beta ​

Interface of @v12-engine/engine

ts
export interface TileDef

What the ground of a map can be painted with, named by the game: grass, road, sand. A cell holds the index of its paint: 0 for none, left to the slope and the height, and 1 and up for the game's tiles in the order it gives them (Rules.tiles). The rules read and paint by name (registry.tile('road')); what each looks like is the view's (GameView.ground.tiles).

A map file says the name of each index it was painted with (GameMap.tileset), so that a map keeps its paint when the game adds tiles or puts them in another order: it is brought in line with the game's list by name

Members ​

id ​

ts
id: string;

Shared by every game, like other ids

name ​

ts
name: string;

What the editor's palette calls it

speed ​

ts
speed?: number;

How fast one on foot goes over it, as a multiplier of its speed: mud at 0.5, a road at 1.2. 1 when left out. What flies or sails is not slowed; the game's own moveSpeed rule keeps the last word (groundSpeedAt)