Skip to content
CVL COREUnity SDK : Zero-Allocation Client

Setup Wizard & Server Config Hydration

[SPECIFICATION] Single Source of Truth (SSOT) Hydration Invariant

The CVL CORE Configuration & Setup Subsystem establishes an authoritative Single Source of Truth (SSOT) pipeline that synchronizes environmental dimensions, kinematic envelopes, and networking invariants across the headless simulation server and the Unity client presentation runtime. Centered around a unified declarative schema (config/cvlcore_engine_config.json), the architecture eliminates manual parameter duplication, guarantees mathematical floating-point parity across the wire, and enforces zero-allocation runtime configuration access via pre-compiled ScriptableObject containers.


[EDITOR COCKPIT // SSOT] CVL CORE Setup Wizard & Mirrored ScriptableObject Inspector
CVL CORE Setup Wizard Master Configuration Cockpit in Unity Editor
CVLEngineConfig ScriptableObject showing mirrored Server SSOT fields

FIGURE 1.0 // Left: The Unity Editor Setup Wizard (CVL CORE > Setup Wizard) governing operational profiles, kinematic ceilings, and local server ignition. Right: The auto-hydrated CVLEngineConfig ScriptableObject mirroring server SSOT invariants for zero-allocation runtime access.

[SEC 01.0] Executive Architecture Overview & Synchronization Model

Section titled “[SEC 01.0] Executive Architecture Overview & Synchronization Model”

Deterministic spatial simulation demands absolute parity between server physics and client presentation. If movement speeds, collision cell boundaries, or network timeouts drift between the headless simulation and the client runtime, users experience positional snapbacks, anti-cheat false positives, and spatial culling failures.

Traditional multiplayer architectures require maintaining duplicate configuration files, asset inspectors, and network settings across client and server repositories. A single desynchronized float often leads to hours of debugging ghost collisions or tuning client-side prediction errors. Furthermore, monolithic headless game servers demand 2 GB to 8 GB of RAM per instance, costing studios $450–$900 AUD per month per node.

CVL CORE couples unified configuration hydration with extreme hardware efficiency:

  • Sub-55.0 MB Flatline RAM Ceiling: The headless simulation ingests, validates, and locks configuration invariants directly into contiguous memory matrices, eliminating reflection overhead and dynamic allocations.
  • Bare-Metal VPS Economy: The entire simulation runs on single-threaded Linux instances ($15–$40 AUD/month), achieving up to 500 active physical proxies per process at 30Hz.
  • Over 50% Bandwidth Reduction: The hydrated 2-frame broadcast divider governs the asymmetric egress pipeline, processing physics at 30Hz while broadcasting kinematic snapshots at 15Hz to slash outbound data costs.
  • Zero Configuration Drift: The client derives spatial boundaries and speed limits directly from the authoritative configuration, guaranteeing floating-point parity across the wire.
CVL CORE Configuration Hydration & Synchronization Topography
+---------------------------------------------------------------------------------+
| CVL CORE CONFIGURATION HYDRATION |
+---------------------------------------------------------------------------------+
| |
| [ Master Schema: cvlcore_engine_config.json ] |
| | |
| +--------------------+--------------------+ |
| | Authoritative Boot Ingest | Bidirectional |
| v v Sync & Export |
| +-------------------------+ +-------------------------+ |
| | AUTHORITATIVE KERNEL | | UNITY EDITOR SDK | |
| | - Fail-Fast Validation | | - CVL Setup Wizard GUI | |
| | - Spatial Bitshift Math | | - Spatial Guardrail Lock| |
| | - Sub-55.0 MB RAM Ceiling | | - CVLEngineConfig Asset | |
| +-------------------------+ +-------------------------+ |
| | | |
| v v |
| [ 30Hz Simulation Tick ] [ Zero-GC Client Engine ] |
| |
+---------------------------------------------------------------------------------+
[SSOT] The Single Source of Truth Pipeline
Section titled “[SSOT] The Single Source of Truth Pipeline”

Rather than allowing parameters to be configured independently on the client or server, cvlcore_engine_config.json acts as the master origin. The Unity Editor cockpit—the CVL Setup Wizard—reads and writes this schema directly, automatically generating the corresponding CVLEngineConfig ScriptableObject asset for client-side consumption.

During the server bootstrap sequence, the engine loads configuration keys directly. The loader enforces strict fail-fast validation: any missing key, unmapped port, or invalid parameter raises an immediate fatal exception at boot, preventing silent fallback bugs or runtime desynchronizations.


[SEC 02.0] Setup Wizard Workflow & Synchronization Lifecycle

Section titled “[SEC 02.0] Setup Wizard Workflow & Synchronization Lifecycle”

The CVL Setup Wizard provides a visual cockpit inside the Unity Editor to inspect, tune, and export engine settings without manually editing raw JSON schemas.

Setup Wizard Configuration & Synchronization Lifecycle
[ Unity Editor Top Bar ] ──> CVL CORE > Setup Wizard
|
v
+------------------------------+
| CVL Setup Wizard GUI Cockpit |
+------------------------------+
|
+---------------------------+----------------------------+
| Inspect & Tune Domains | Prefab Geometry Audit
v v
- Networking & Ports (55555 / 55556) - Inspect PrefabCatalog AABBs
- Spatial Dimensions & Cell Sizes - Assert CellSize >= MaxEntityRadius
- Kinematic Speed & Jump Ceilings - Fail-Fast GUI Lock on Breach
- Prefab Prefix Routing Tables |
| |
+---------------------------+----------------------------+
|
v
[ Save Configuration to Server JSON ]
- Validates all spatial guardrails
- Writes config/cvlcore_engine_config.json
- Generates CVLEngineConfig.asset
|
v
[ Save and Launch Local Server ]
- Boots local headless micro-kernel
- Anchors to OS working directory
- Instant local validation on 127.0.0.1

In the Unity Editor menu bar, navigate to CVL CORE > Setup Wizard. The editor script automatically locates or instantiates the project’s CVLEngineConfig.asset ScriptableObject within the SDK asset directory.

[STEP // 02] Configure Operational Domains
Section titled “[STEP // 02] Configure Operational Domains”

Review and adjust settings across four isolated operational tiers:

  • Networking & Transport: Host IP, server port, administrative diagnostics port, and socket timeouts.
  • Spatial Computing: World dimensions, macro-zone boundaries, grid columns/rows, and broadphase collision cell size.
  • Role-Aware Kinematics: Grounded speed, aerial flight speed, jump ceiling, and projectile time-to-live.
  • Prefab Routing: Assign pooled entity prefabs and configure zero-allocation string-prefix classification rules.

The wizard exposes two primary operational actions:

  1. Save Configuration to Server JSON: Serializes current editor parameters directly into config/cvlcore_engine_config.json, keeping server definitions perfectly aligned.
  2. Save and Launch Local Server: Validates all spatial guardrails, updates the server JSON file, and launches the local headless server process in the background for instant iteration on 127.0.0.1.

[SEC 03.0] Configuration Domains & System Mechanics

Section titled “[SEC 03.0] Configuration Domains & System Mechanics”

Parameters are categorized into four decoupled operational domains to ensure structural separation across the codebase.

Controls the binary socket ingestion pipeline and connection watchdogs:

  • Host & Ports: Configures the primary Little-Endian TCP stream (55555) and the secondary 1.0Hz administrative vitals telemetry stream (55556).
  • Flatline & Auth Timeouts: Enforces transport silence thresholds. If an authenticated client stops emitting 30Hz telemetry or 1.0Hz pings for longer than FLATLINE_TIMEOUT (default: 10.0s), the server triggers an inline eviction (REASON_TIMEOUT = 0x01). Handshakes must complete within AUTH_TIMEOUT (10.0s).
[DOMAIN // B] Spatial Computing & Grid Matrix
Section titled “[DOMAIN // B] Spatial Computing & Grid Matrix”

Governs broadphase spatial partitioning and macro-zone transitions:

  • Power-of-Two Alignment: All grid dimensions (ZONE_SIZE, COLLISION_CELL_SIZE, GRID_COLS, GRID_ROWS) must be positive powers of two (2^n). This allows both the server and client to replace expensive division and modulo arithmetic with single-cycle bitshift operations: cell_idx = (home_cy << row_shift) | home_cx.
  • Collision Cell Sizing: Bounded strictly between 4.0m and 64.0m. Cells smaller than 4.0m cause excessive memory bucket thrashing during movement; cells larger than 64.0m dilute broadphase culling and force costly brute-force proximity scans.
[DOMAIN // C] Role-Aware Kinematics Authority
Section titled “[DOMAIN // C] Role-Aware Kinematics Authority”

Defines authoritative anti-cheat envelopes for player and agent movement:

  • Speed & Jump Ceilings: MAX_GROUNDED_SPEED and MAX_JUMP_HEIGHT govern walking entities, while MAX_FLYING_SPEED and MAX_FLIGHT_CEILING govern 6-DOF aerial roles.
  • Monotonic Sequence Clamping: Movement frames arriving from clients are evaluated against server hardware delta time. Displacements exceeding the hydrated speed threshold increment entity network strikes; exceeding strike limits triggers immediate eviction (REASON_SPEEDHACK = 0x02).
[DOMAIN // D] Entity Pooling & Prefix Routing
Section titled “[DOMAIN // D] Entity Pooling & Prefix Routing”

Eliminates runtime allocations by binding entity IDs to pre-warmed visual prefabs:

  • Prefab Catalog: An indexed array of client presentation prefabs pre-warmed at scene startup up to totalPoolCapacity.
  • Prefix Routing Table: Configures PrefabPrefixRoute structs that map string prefixes on incoming Entity IDs (EIDs) directly to catalog indices (e.g., routing BOT_ or CHAOS_ to bot models, and P_ to human player rigs). This evaluation runs via unmanaged byte spans, completely bypassing dynamic string allocations on the network thread.
[SPEC] Client Access to Hydrated Engine Settings
Section titled “[SPEC] Client Access to Hydrated Engine Settings”

Client gameplay scripts do not parse JSON or access configuration dictionaries directly. Instead, they reference the hydrated CVLEngineConfig ScriptableObject through CVLNetworkManager or the static public engine API:

Assets/CVL_CORE_SDK/Entities/PlayerMotor.cs
using UnityEngine;
using CVLCore.SDK;
public sealed class PlayerMotor : MonoBehaviour
{
private CVLEngineConfig config;
private void Start()
{
// Cache authoritative configuration from the active network manager
this.config = CVLNetworkManager.Instance.EngineConfig;
// Clamp local movement speeds to match server anti-cheat envelopes
float maxAllowedSpeed = this.config.maxGroundedSpeed;
Debug.Log($"Local speed authority initialized: {maxAllowedSpeed} m/s");
}
}
[SPEC] Listening to Connection State Lifecycle
Section titled “[SPEC] Listening to Connection State Lifecycle”

Subscribe to public transport events to detect when the client completes configuration hydration and enters active gameplay:

Assets/CVL_CORE_SDK/Core/ConnectionObserver.cs
using UnityEngine;
using CVLCore.SDK;
public sealed class ConnectionObserver : MonoBehaviour
{
private void OnEnable()
{
CVLEngineAPI.OnNetworkStateChanged += HandleConnectionStateChanged;
}
private void OnDisable()
{
CVLEngineAPI.OnNetworkStateChanged -= HandleConnectionStateChanged;
}
private void HandleConnectionStateChanged(EngineConnectionState state, string message)
{
if (state == EngineConnectionState.ActiveGameplay)
{
Debug.Log("Client hydrated, colliders baked, and synchronized with 30Hz server tick.");
}
}
}

[SEC 04.0] Performance Forensics & SSOT Parity Profile

Section titled “[SEC 04.0] Performance Forensics & SSOT Parity Profile”

The operational impact of CVL CORE’s unified configuration and flatline memory architecture demonstrates clear efficiency advantages over monolithic dedicated server runtimes:

[BENCHMARK] Empirical Performance & Efficiency Profile (500 Active Entities)
Section titled “[BENCHMARK] Empirical Performance & Efficiency Profile (500 Active Entities)”
Architectural Metric Monolithic Engine Runtime CVL CORE SSOT Architecture Operational Advantage
Boot Hydration Latency 2,450.0 ms – 4,800.0 ms 1.2 ms Pre-compiled schema validation bypasses reflection.
Active Server Memory Footprint 1,850.0 MB – 3,400.0 MB Sub-55.0 MB Flatline C-bytearray matrix eliminates heap growth.
Outbound Egress 180 KB/s (30Hz broadcast) 78 KB/s 15Hz asymmetric conflation cuts egress by >50%.
Client GC Allocation on Boot 14.8 MB (JSON reflection) 0 B ScriptableObject reads eliminate managed heap churn.
Broadphase Spatial Query O(N) or O(log N) tree scan O(1) Power-of-two bitshifts compute cell indices in nanoseconds.
Hosting Cost per Node $450 – $900 AUD / mo $15 – $40 AUD / mo Runs on single-threaded bare-metal Linux VPS nodes.

[SEC 05.0] Architectural Invariants & Guardrails

Section titled “[SEC 05.0] Architectural Invariants & Guardrails”

Operational guardrails prevent configuration desynchronization and ensure fail-fast schema compliance.

The Setup Wizard performs an automated geometry audit across all prefabs in your PrefabCatalog. If the configured COLLISION_CELL_SIZE is smaller than the largest detected entity bounding diameter, the wizard enters a hard GUI error lock and disables configuration saving. This prevents spatial indexing failures where large entities bridge across multiple unculled buckets.

[GUARDRAIL] Strict Zero-Fallback Schema Policy
Section titled “[GUARDRAIL] Strict Zero-Fallback Schema Policy”

The server simulation prohibits silent fallback constants and dictionary default methods during boot. If an expected configuration key is missing or malformed in cvlcore_engine_config.json, the server aborts initialization immediately. Developers must use the Setup Wizard to export configurations to ensure complete schema compliance.

[GUARDRAIL] Continuous Process Decoupling & Working Directory Anchoring
Section titled “[GUARDRAIL] Continuous Process Decoupling & Working Directory Anchoring”

When invoking Save and Launch Local Server, the wizard anchors the spawned process to the project root directory. The engine uses relative pathing anchored to the operating system working directory, ensuring identical execution behavior whether running locally in Unity or deployed inside a headless Linux systemd unit.

[CHECKLIST // INVARIANTS] SPATIAL CONFIGURATION & PHYSX GUARDRAILS

1. Power-of-Two Cell Bounds: COLLISION_CELL_SIZE must be a power of two strictly between 4.0m and 64.0m (and >= the largest entity bounding radius).
2. Remote Proxy PhysX Isolation: Zero active Rigidbody or solid Collider components on remote proxies; gate Physics.SyncTransforms() strictly behind isLocalPlayer == true.
3. Pooled Ballistic Projectiles (Role 9): Always invoke TrailRenderer.Clear() inside OnEnable() to prevent pool-recycling trail streaks.


Because the Setup Wizard writes directly to config/cvlcore_engine_config.json and enforces compile-time parity against the headless Linux micro-kernel, refer to the corresponding server specifications when tuning operational presets:

Section titled “[RELATED SPECS] Cross-Category Subsystem Links”
  • Server Operational Profiles & Mode Matrix: Review the four server operational modes (MAP_MODE, OBSTACLE_MODE, COLLISION_MODE, and USE_SPATIAL_CULLING) and JSON configuration schemas on the Operational Profiles & Mode Matrix page.
  • Power-of-Two Spatial Grid & Obstacle Baking: Review why ZONE_SIZE and COLLISION_CELL_SIZE enforce strict power-of-two bitwise shift invariants and how baked static_obstacles.json AABBs are ingested on the Broadphase Spatial Hashing & 3D CCD page.