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:
irrlicht
2026-09-18 22:56:30 +02:00
co-authored by Claude Opus 5
parent 303c587aee
commit f594f12f35
20 changed files with 496 additions and 1500 deletions
Generated
+8 -30
View File
@@ -228,15 +228,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "client"
version = "0.1.0"
dependencies = [
"bytemuck",
"pbio",
"shared",
]
[[package]]
name = "codespan-reporting"
version = "0.12.0"
@@ -443,6 +434,14 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
[[package]]
name = "game"
version = "0.1.0"
dependencies = [
"pbio",
"sim",
]
[[package]]
name = "gethostname"
version = "1.1.0"
@@ -854,10 +853,6 @@ dependencies = [
"jni-sys 0.3.0",
]
[[package]]
name = "netsim"
version = "0.1.0"
[[package]]
name = "num-traits"
version = "0.2.19"
@@ -1471,23 +1466,6 @@ dependencies = [
"syn",
]
[[package]]
name = "server"
version = "0.1.0"
dependencies = [
"bytemuck",
"shared",
"sim",
]
[[package]]
name = "shared"
version = "0.1.0"
dependencies = [
"bytemuck",
"sim",
]
[[package]]
name = "shlex"
version = "1.3.0"