OxRox co-op uses Steam Networking Sockets for transport. We still needed a simulation model that kept both games synchronized without delaying local movement.
OxRox is a Boulder Dash-style game where a fraction of a second matters. You slip past enemies, dodge falling hazards, and coordinate movement with a partner. The game can run at up to 2× speed, which makes network delay even more visible.
The lockstep experiment
OxRox already has deterministic gameplay, so lockstep was a reasonable first prototype. Both peers run the same simulation and exchange inputs. A step only advances after both inputs arrive.
In our tests, waiting for remote input added roughly 200 ms of input delay. Movement already felt heavy at normal speed and was unpleasant at 2× speed. Dodging enemies and falling hazards became unreliable.
Rollback with GGPO
GGPO was developed for fighting games, where immediate input is also more important than perfectly smooth remote movement.
Rollback works as follows:
- Apply local input immediately.
- Predict remote input when it has not arrived yet.
- Compare the prediction with the real input once it arrives.
- If they differ, restore an earlier game state and quickly simulate forward again with the correct inputs.
The correction can be visible, but local controls remain responsive.
PvE trade-offs
Competitive rollback games need to account for fairness between players. OxRox co-op is PvE, so both players share the same outcome.
We can accept an occasional visible correction on an enemy if both players retain immediate controls.
The result
At around 100 ms ping and high gameplay speed, local movement has no network-added input delay. Enemies can look unusual when a rollback is visible, but the controls remain consistent. This was a clear improvement over the lockstep prototype.