Skip to content

HostTiming beta ​

Interface of @v12-engine/engine

ts
export interface HostTiming

Where a host's time went over a while: see SessionHost.takeTiming

Members ​

bytes ​

ts
bytes: number;

Characters of the rounds' text, to every seat, before any compression of the wire

keys ​

ts
keys?: Record<string, number>;

Those characters by what they carry, when the host counts them (SessionHostOptions.bytesByKey): each field of the entities added and changed (entity.health, entity.own.abilities), the other parts (rest.players, rest.fog), events, removed, and the rest (ids, brackets) as other. They add up to bytes

parts ​

ts
parts: {
        capture: number;
        quantize: number;
        fog: number;
        diff: number;
        stringify: number;
    };

Where the sending's milliseconds went, added up over the seats: what each player may know taken from the world (capture), its positions rounded (quantize), the fog made runs (fog), what changed since the frame they have (diff), made text (stringify)

sendMax ​

ts
sendMax: number;

The longest a single round of sending took, in milliseconds

sends ​

ts
sends: number;

Rounds of sending everyone what changed

sendTime ​

ts
sendTime: number;

Milliseconds the rounds of sending took, added up

since ​

ts
since: number;

When the counting started, performance.now()

tickMax ​

ts
tickMax: number;

The longest a single tick took, in milliseconds

ticks ​

ts
ticks: number;

How many simulation ticks were stepped in the period

tickTime ​

ts
tickTime: number;

Milliseconds the ticks took, added up, and the longest