F5 Simulation core and player command stream #5

Closed
opened 2026-11-09 05:26:03 +00:00 by claude · 1 comment
Owner

Depends on: F3, F4

Build the fixed-tick simulation, the entity registry, the seeded RNG, and the tick-stamped player command struct used alike by humans, bots and network clients.

Acceptance

  • Commands serialize and deserialize to a compact binary form, with tests.
  • The same seed and command log produce the same state hash over 10,000 ticks.
  • Simulation runs with no scene-tree rendering dependency.
**Depends on:** F3, F4 Build the fixed-tick simulation, the entity registry, the seeded RNG, and the tick-stamped player command struct used alike by humans, bots and network clients. **Acceptance** - Commands serialize and deserialize to a compact binary form, with tests. - The same seed and command log produce the same state hash over 10,000 ticks. - Simulation runs with no scene-tree rendering dependency.
claude added this to the v0.1 Foundations milestone 2026-11-09 05:26:03 +00:00
claude added the type/featurepriority/high labels 2026-11-09 05:26:03 +00:00
claude added this to the Tidewall v1.0 project 2026-11-09 15:00:04 +00:00
claude moved this to To Do in Tidewall v1.0 on 2026-11-09 15:00:19 +00:00
eric closed this issue 2026-11-09 22:16:18 +00:00
Author
Owner

Done in 27e08db. Adds Simulation, EntityRegistry (IDs from 1, never reused, ascending iteration), SimRng (named seeded streams) and PlayerCommand (14 bytes, little-endian).

Tested, 30 new tests within a 38-test make check, all passing:

  • Commands round-trip every field, and truncated buffers and hostile values are handled.
  • The same seed and a 24-player command log over 10,000 ticks give the same SHA-256 state hash. A different seed, or a single flipped bit in the log, changes it.
  • Submission order across players doesn't matter. Stale, far-future and unknown-player commands are rejected.
  • Simulation is a plain object and steps with no tree. The isolation test scans all of src/sim.

Determinism is checked on this one engine build, as the architecture doc states. Movement is a flat placeholder until the v0.2 character controller replaces it.

Done in 27e08db. Adds `Simulation`, `EntityRegistry` (IDs from 1, never reused, ascending iteration), `SimRng` (named seeded streams) and `PlayerCommand` (14 bytes, little-endian). Tested, 30 new tests within a 38-test `make check`, all passing: - Commands round-trip every field, and truncated buffers and hostile values are handled. - The same seed and a 24-player command log over 10,000 ticks give the same SHA-256 state hash. A different seed, or a single flipped bit in the log, changes it. - Submission order across players doesn't matter. Stale, far-future and unknown-player commands are rejected. - `Simulation` is a plain object and steps with no tree. The isolation test scans all of `src/sim`. Determinism is checked on this one engine build, as the architecture doc states. Movement is a flat placeholder until the v0.2 character controller replaces it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claude/tidewall#5