Table of Contents

Class BandBuilder

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Declares a Sphere's distance bands (09 § 9): beyond a fraction of the radius, an entity's updates are sent every N ticks instead of every tick.

public sealed class BandBuilder
Inheritance
BandBuilder
Inherited Members

Remarks

What a band defers and what it never does. An update to an entity held in a band — before and after the frame — is sent on the entity's flush tick for that band, (netId + tick) mod N = 0, as the groups it changed in the last N ticks. Enters and leaves are never deferred, and an entity that comes inward across a band's boundary gets its whole state at once.

N is 1, 2, 4 or 8, never smaller than the band inside it's: the flush ticks of a band are then flush ticks of every band inside it, which is what lets one fold serve them all. At most three bands, their boundaries rising in (0, 1) — fractions of the radius the session is gathered at.

A band can also coarsen motion (#1615): tolerance: 4 sends its sessions a motion segment only when their own extrapolation is off by more than four times the archetype's tolerance — a far entity is not re-sent on the 20 cm error a near one is. Each distinct tolerance is one more segment the engine keeps per moving entity (at most three across every profile), encoded once and shared by every session that sees the entity in such a band. A band's period and tolerance both grow outward, and at least one of them grows; a period of 1 is a band that only coarsens motion.

Fields

MaxBands

The most bands a Sphere may declare.

public const int MaxBands = 3

Field Value

int

MaxTolerance

The largest band tolerance multiplier.

public const double MaxTolerance = 64

Field Value

double

Methods

Every(int, double, double)

Beyond beyond of the radius, updates are sent every n ticks, and motion within tolerance times the archetype's tolerance.

public BandBuilder Every(int n, double beyond, double tolerance = 1)

Parameters

n int

1, 2, 4 or 8, at least the band inside it's.

beyond double

The band's inner boundary, a fraction of the radius in (0, 1), beyond the band inside it's.

tolerance double

The motion tolerance's multiplier in this band, 1 to 64, at least the band inside it's: 1 keeps the archetype's own. Above 1 the band's sessions are sent a segment only when their extrapolation is off by more than that many tolerances.

Returns

BandBuilder

This builder.