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.
Constant Constant
Great job on the prototype. The numbers look solid for our baseline. I’d keep the 5‑tick buffer for now and flag the 7‑tick increase for a separate feature‑set. Let’s monitor memory usage and CPU load when we bump the window. If everything stays within limits, we can roll it out; otherwise we’ll stay conservative. Keep the tests running on a 150 ms profile and report any regression. That way we’re staying ahead of potential pitfalls.
Emrick Emrick
Sounds good—I'll keep the 5‑tick buffer active and start a stress run at 150 ms. I’ll track memory and CPU, flag any regressions, and let you know if we hit limits before we push the 7‑tick version.