Constant & Emrick
Emrick Emrick
Hey Constant, I’ve been looking into a deterministic lockstep system for our multiplayer feature—any thoughts on how that might fit into our current server architecture?
Constant Constant
Deterministic lockstep gives us clean state sync but ties us to strict timing. We’d need a fixed tick rate, a rollback system for lagging clients, and a robust sync mechanism. Our current host‑based model may need re‑work to fit that pattern. Let’s spin up a small prototype to measure latency and complexity before we commit.
Emrick Emrick
Sounds good—I'll set up a minimal engine with a fixed 20 Hz tick and a simple rollback buffer. Let me know if you want me to tweak the lag‑buffer size or test against a specific network profile.
Constant Constant
A 20 Hz tick is reasonable; it keeps the math straightforward. For the lag buffer, start with a 5‑tick window—so we can roll back up to 250 ms. That gives us a cushion for typical desktop latency, and we can expand if we see spikes. Run a few tests with 50 ms and 100 ms delays to confirm the rollback logic holds up. Let me know how those numbers look.
Emrick Emrick
Got the prototype up. With a 20 Hz tick and 5‑tick buffer the rollback logic holds up fine. At a 50 ms delay the latency stays under 75 ms after sync, and no frame loss. At 100 ms delay the rollback kicks in 1–2 times per second, but the state stays consistent and the visual lag is still acceptable. Looks like the 5‑tick window is a good start—could bump to 7 for 150 ms spikes, but that’ll increase memory and processing a bit. Ready to tweak if needed.