The CVL CORE Unity C# Client SDK separates high-frequency spatial transform streaming from stateful gameplay and persistence transactions. By multiplexing custom RPCs, inventory mutations, and player state requests over the existing non-blocking TCP socket into out-of-process server sidecars, Unity clients execute complex backend transactions with zero main-thread socket stalls and zero impact on the server's 30Hz physics loop.
Binary RPC Transport Verified — Turnkey Persistence Prefabs Coming Next: The underlying C# binary event dispatcher and asynchronous callback router are built into Protocol v3.4.0. Drop-in Unity inventory/persistence prefabs and automated C# contract generation (via the SDK Setup Wizard) will be finalized alongside post-demo database adapter selection.
Rather than opening secondary HTTP/REST connections or stalling the Unity render thread with external database SDKs, the Unity client multiplexes all gameplay and persistence RPCs over its single persistent TCP_NODELAY connection (Port 55555):
| Traffic Class | Wire Framing | Server Routing Path | Client Execution Model |
|---|---|---|---|
| Spatial Transforms | Fixed-Stride Quantized Binary | Enters 30Hz 64-byte C-memory physics matrix. | Unpacked into 65,536-slot SPSC ring buffer (133ms smoothing). |
| Sidecar RPC & Persistence | Fixed Header + Binary Payload | Bypasses physics thread (0.00ms tax) straight to 127.0.0.1:55557. |
Dispatched asynchronously via correlation token callbacks. |
sequenceDiagram autonumber participant UI as Unity Main Thread (C# UI / Inventory) participant Net as SDK Background Socket Worker participant Reactor as CVL CORE Ingress Reactor (Port 55555) participant Sidecar as Persistence / RPG Sidecar (127.0.0.1:55557) UI->>Net: Enqueue Binary RPC (Route Slot, Action Code, Correlation ID) Net->>Reactor: Multiplexed Sidecar Event Frame Note over Reactor: 0.00ms Physics Bypass (30Hz Loop Untouched) Reactor->>Sidecar: Forward Frame over Loopback IPC Sidecar-->>Reactor: Commit State & Return Result Frame Reactor-->>Net: Sidecar Response Frame (Matched Correlation ID) Net-->>UI: Resolve Main-Thread Callback on Next Update()
Every client-initiated persistence request, inventory action, or custom gameplay RPC is framed inside a deterministic binary header followed by a variable-length payload:
O(1) time to one of 256 registered sidecar slots (e.g., Inventory Ledger, Character Persistence, Guild Bank, or Zone Chat) and specifies the target operation code.Once turnkey database adapter selection is finalized following the initial demo release, the Unity SDK will expand with two developer workflow upgrades:
MemoryMarshal C# client structs and matching server sidecar stubs.
1. Zero Client Authority Over Persistent State: Unity clients never write directly to databases or mutate authoritative inventory counts locally; all state transitions must be validated and committed by an authoritative Sidecar.
2. Zero Main-Thread Socket Blocking: All RPC serialization and socket dispatch must execute through the SDK's background egress worker.
3. Deterministic Timeout Handling: Client UI layers must handle sidecar circuit-breaker bounce codes gracefully so storage maintenance never freezes gameplay rendering.