DevLog #6 - Server State
Posted on August 21, 2025 by Brinn
TL;DR
- Authoritative loop stable at 200 Hz with delta snapshots.
- RiftNet finalized as a static lib; encryption, compression, and reliable UDP integrated.
- RiftEventBus v1 live (MIT); wired between handler and gameplay.
- RiftPhys bridge in; Bullet backend for vertical slice; server remains authoritative.
- Account/Auth (SQL Server + Argon2) works;
account_detailslive update path next. - Per-client baselines, UE client hookup, spawn/zone logic, and deterministic playback harness are the short-term focus.
Networking
- Crypto: X25519 KX; AEAD is pluggable (currently AES-GCM). PQC (Kyber hybrid) planned.
- Compression: LZ4 in the fast path.
- Reliability: seq/ack with RFC-6298 RTT/RTO; retransmit + dedupe.
- Snapshots: baseline + delta system; current baseline cadence = 1s (global). Per-client baselines next.
- Observed timings: snapshot 2-3 ms; dispatch < 0.5 ms (modest entities). Frames ~26-94 B depending on delta density.
- Scale so far: clean at 50/500 clients; 5,000 connection soak on local infra.
Server Loop & Determinism
- Input ingestion -> state update -> snapshot emit.
- Canonical FNV-1a hash over serialized fields (sorted IDs) to detect divergence.
- Window stats logged for regression checks.
Serialization & Handlers
- Migration off FlatBuffers to POD structs + custom binary serializer.
- Endian + version guards in progress; goal is to lock the wire format prior to UE integration.
Physics
- IRiftPhysics interface landed; Bullet backend for now.
- Authoritative raycasts/sweeps for RiftStep validation next.
- RiftFSX modules will replace Bullet pieces once the gameplay loop is proven.
Accounts / Web Edge
- CivetWeb + ODBC to SQL Server; Argon2 password hashes; duplicate e-mail/username rejection verified.
- Next:
account_detailsupdate-on-login without redirect; session token flow hardening.
Client (UE)
- Two executables: Player and Dev/Admin (no dev tools in player build).
- Next: wire handshake -> snapshot ingest -> basic interpolated draw; add runtime perf overlay.
World Systems
- Terrain Service will live as its own server-side module (feeds collision + nav).
- Spawn and Zone scaffolding unlock meaningful crowd tests and occlusion/culling work.
Risks / Gaps
- Per-client baselines pending (bandwidth predictability across diverse RTTs).
- Deterministic playback harness not yet gating builds (hash is diagnostic only).
- Terrain/zone not in -> no real crowd/visibility tests yet.
- UE path is greenfield; expect iteration on input buffering and interpolation.
Next 2 Weeks (to Sept 5, 2025)
- Per-client baselines + snapshot packing cleanup.
- UE client handshake -> snapshot ingest -> basic render path.
- Spawn/Zone scaffolding; simple entity lifecycle (spawn/despawn/update).
- Deterministic playback (record/replay + canonical hash gate).
- RiftStep raycasts/sweeps (server authoritative).
account_detailslive update path.