Embed the sim in the game binary; drop networking
The client becomes the game: it owns a Sim instance and advances it with a fixed-timestep accumulator (24 Hz ticks, rendering at frame rate). Rendering, pathfinding and collision read the World directly instead of a chunk cache. Sim::pending (window slot maps, late rule, horizon) is replaced by one intent per entity for the next movement window — set_action replaces, executing the window consumes. The whole client prediction/reconciliation machinery (tick estimation, RTT lead, retraction, replay) is gone with the latency it was built for; click-to-move now syncs the route against the sim position after every window. Removed: server, netsim, shared (wire types), client/net.rs. client renamed to game. Headless tests cover the intent model. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
303c587aee
commit
f594f12f35
@@ -85,10 +85,6 @@ pub const TICK_HZ: u32 = 24;
|
||||
/// `TICKS_PER_MOVE` ticks (6 Hz). Window `w` executes at tick `w * TICKS_PER_MOVE`.
|
||||
pub const TICKS_PER_MOVE: u32 = 4;
|
||||
|
||||
/// How many *future* movement windows an actor may address. Actions targeted beyond
|
||||
/// this horizon are dropped.
|
||||
pub const ACTION_WINDOW_HORIZON: usize = 3;
|
||||
|
||||
/// Movement vocabulary: whether a tile id blocks movement. Keep this in lockstep with
|
||||
/// the tileset in `overworld.tga`.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user