Table of Contents

Class RealmConfig

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

A realm's configuration: its spatial grid (its identity — bounds, cell size, depth) and its policy when unobserved. Every load-bearing value is required and explicit; nothing is derived from another realm or from a workload.

public sealed class RealmConfig
Inheritance
RealmConfig
Inherited Members

Remarks

Registered through Realms before InitializeArchetypes. The single-world ConfigureSpatialGrid(config) registers realm 0 with SimulatedAlways(SpatialGridConfig).

Constructors

RealmConfig()

public RealmConfig()

Properties

Grid

The realm's own grid: bounds, cell size, 2D or 3D, and every per-realm spatial knob. Never shared with another realm.

public required SpatialGridConfig Grid { get; init; }

Property Value

SpatialGridConfig

Parent

The realm this one belongs to, for event routing only (an interior's planet). None for a root.

public RealmId Parent { get; init; }

Property Value

RealmId

Replication

How sessions are served in this realm (12-realms § 2.1), or null when no session may be in it: entering it throws, and a session whose followed entity enters it is in no realm. Realm 0 of ConfigureSpatialGrid is served with the subscription options' own cell.

public RealmReplicationConfig Replication { get; init; }

Property Value

RealmReplicationConfig

SleepAfterTicks

Unobserved ticks before a Sleep realm goes dormant — the hysteresis that keeps a door flap from toggling it. Required (> 0) with Sleep, ignored otherwise.

public int SleepAfterTicks { get; init; }

Property Value

int

UnobservedTickDivisor

Unobserved simulation rate divisor: 1 = full rate, N = each cluster once every N system runs. At least 1.

public required int UnobservedTickDivisor { get; init; }

Property Value

int

WhenUnobserved

What the realm does while unobserved.

public required RealmUnobserved WhenUnobserved { get; init; }

Property Value

RealmUnobserved

Methods

SimulatedAlways(SpatialGridConfig)

A realm simulated at full rate whether observed or not — what a single-world application's realm 0 is.

public static RealmConfig SimulatedAlways(SpatialGridConfig grid)

Parameters

grid SpatialGridConfig

Returns

RealmConfig