Skip to content

TerrainSave beta ​

Interface of @v12-engine/engine

ts
export interface TerrainSave

A terrain as plain data: in a save, and sent to a remote player as the game starts

Members ​

blocked ​

ts
blocked?: string | number;

What scenery keeps off each cell. Left out by saves from before there was any

bounds ​

ts
bounds?: {
        x: number;
        z: number;
        width: number;
        depth: number;
    };

The part of the map play happens in, when it is not all of it

cells ​

ts
cells?: Record<string, string | number>;

The game's layers of cells (Terrain.cells), by id, as the other layers. Left out when there are none

depth ​

ts
depth: number;

Cells along the map

heights ​

ts
heights: string | number;

Each layer as packed bytes (see packBytes), or, where every cell holds the same, that value: a map without water or cliffs, of one ground, says so in a few characters rather than a few hundred thousand

levels ​

ts
levels: string | number;

The cliff level per cell, packed or as the one value every cell holds

tiles ​

ts
tiles: string | number;

The paint per cell, packed or as the one value every cell holds

water ​

ts
water: string | number;

The WATER_* value per cell, packed or as the one value every cell holds

waterHeights ​

ts
waterHeights: string | number;

The height of the water's surface per vertex, packed or as the one value every vertex holds

width ​

ts
width: number;

Cells across the map