Skip to content

Snapshot beta ​

Interface of @v12-engine/engine

ts
export interface Snapshot

Everything one player knows about the game at the end of a tick

Members ​

areas ​

ts
areas?: AreaState[];

The areas of abilities on the ground the player is told of: zones and delayed blasts, their side's and others' where they see them. None when left out

camera ​

ts
camera?: SeatCamera;

What the rules said of the player's camera that lasts, a part of the map it stays in (see cameraFor). None when they said none

corpses ​

ts
corpses?: CorpseState[];

Corpses where the player can see the ground, by the id of who died there (see raiseDead). None when left out

debug ​

ts
debug?: {
        noCooldowns: boolean;
        noManaCosts: boolean;
        invulnerable: boolean;
        speed: number;
        explored?: boolean;
    };

The switches of the debug tools as they stand, for a player who may use them (world.debugPlayers): explored, the whole map explored (debug.explore)

entities ​

ts
entities: EntityState[];

The entities the player may know of, as of this tick

events ​

ts
events: SessionEvent[];

What happened since the last snapshot that the player is told of, oldest first

hour ​

ts
hour?: number;

Hour of the day, 0..24, in a game with days and nights

items ​

ts
items: GroundItemState[];

Items on the ground, where the player can see the ground

missiles ​

ts
missiles: MissileState[];

Missiles in flight the player can see

outcome ​

ts
outcome: Outcome;

How the game stands for the player: still playing, a victory or a defeat

players ​

ts
players: PlayerState[];

Every player of the game, with what the receiving player may know of each

projectiles ​

ts
projectiles: ProjectileState[];

Projectiles in flight the player can see

report ​

ts
report?: Record<string, unknown>;

What the game tells the player about itself, see Rules.report

reveals ​

ts
reveals: RevealState[];

Spots someone sees for a while. Everyone can tell, not only whoever it is

score ​

ts
score?: ScoreState;

The score of the players the player is told of (RuleSettings.score: live, then end), told again at most once in refresh seconds. None in a game that counts nothing

scoreLine ​

ts
scoreLine?: ScoreLineState;

The score's timeline, of the same players: told again at each point of it (ScoreSettings.every)

tick ​

ts
tick: number;

The tick number the snapshot was taken at