SimNetLab is a C++23 bachelor research project developed over approximately 14 weeks.
It investigates how snapshot replication techniques affect bandwidth, packet submissions, representation quality, recovery behavior, and processing cost in a server-authoritative ECS simulation.
- Selection and scheduling: Radius and field-of-view AOI, every-tick and reduced cadence, and distance-band LOD.
- Representation: Raw records, position quantization, octahedral heading encoding, and 128-bit bit-packed records.
- Update reduction: Whole-record and field-mask Delta encoding.
- Delivery: Reliable and unreliable sequenced delivery with bounded application packetization.
- Compression: No compression, whole-update ordinary Zstd, and per-packet ordinary Zstd.
- Workloads: Authoritative boids and controlled synthetic Delta workloads.
The pipeline describes selection, representation, Delta, AOI, LOD, and encoding. See compression, packetization, transport, and synthetic workloads for details.
Server replication CSV v4 records one row per replication attempt. Client replication CSV v4 records one row per received Snapshot-lane application packet. Analysis combines those rows into one result per complete Server and Client run.
The headless builds exclude rendering and Tracy. Whole-process perf stat measurements use separate
executions from semantic CSV measurements. See BENCHMARKING.md for details.
- Linux
- CMake and Ninja
- Git
- A C++23 compiler with named-module support
- Dependencies supplied through the vcpkg submodule
- Raylib only for optional rendering
The final headless benchmark builds were validated with GNU C++ 16.2.1. Raylib is required only for optional visual builds, which are excluded from benchmark runs.
Clone with submodules and run the bootstrap script:
git clone --recurse-submodules https://github.com/V4LKdev/SimNetLab.git
cd SimNetLab
./bootstrap.shThe script initializes the vcpkg submodule, bootstraps vcpkg when needed, configures the Debug preset, and builds it. The following CMake commands are the equivalent manual commands. Run the test preset afterward:
cmake --preset debug
cmake --build --preset debug
ctest --preset debugcmake --preset evidence
cmake --build --preset evidence
cmake --preset evidence-synthetic
cmake --build --preset evidence-syntheticBoth presets produce headless Release Server and Client executables. Only the synthetic build includes synthetic workload support.
Start Server and Client in separate terminals with the same shared profile and run ID.
build/evidence/app/Server \
--config config/server_default.json \
--shared-config config/shared_demo_network.json \
--run-id example-headless \
--max-ticks 600build/evidence/app/Client \
--config config/client_default.json \
--shared-config config/shared_demo_network.json \
--run-id example-headless \
--max-ticks 600The tick limit only keeps the example bounded. It is not an experiment prescription.
With relWithDebInfo built, start the visual Server and Client in separate terminals:
build/relWithDebInfo/app/Server \
--config config/server_visual.json \
--shared-config config/shared_demo_visual.jsonbuild/relWithDebInfo/app/Client \
--config config/client_visual.json \
--shared-config config/shared_demo_visual.jsonVisual state is for demonstration and diagnosis. See render and configuration for details.
app/serverandapp/clientcompose and orchestrate the executable runtimes.app/commonprovides the shared application protocol and delivery state.simnet_coredefines bytes, identifiers, math, and fixed-step types.simnet_runtimeplans fixed-step frames and evaluates runtime limits.simnet_configloads strict JSON configuration and computes fingerprints.simnet_snapshotdefines complete snapshots, patches, validation, and reconstruction.simnet_pipelineselects, transforms, encodes, and decodes snapshot updates.simnet_compressionprovides bounded Raw and ordinary Zstd envelopes.simnet_packetizationsplits and reassembles bounded application packet groups.simnet_transportprovides ENet sessions and opaque byte delivery.simnet_game_serverruns the authoritative Flecs simulation.simnet_game_clientapplies reconstructed state to the Client Flecs sink.simnet_spatialprovides deterministic sparse-grid queries.simnet_syntheticcreates controlled deterministic snapshot workloads.simnet_telemetryprovides logging and versioned CSV persistence.simnet_renderprovides the optional Raylib demonstration.
- SimNetLab is Linux-focused.
- ENet is the only transport.
- Reported transport bytes are application payload bytes accepted by ENet. They exclude lower-level protocol overhead and physical network traffic.
- The Client has no prediction.
- Packet-loss recovery requires controlled and documented network impairment.