-
Notifications
You must be signed in to change notification settings - Fork 26
Home
GGRS is a reimagination of the GGPO, enabling P2P rollback networking in Rust. Rollback to the future!
Taken from 👉the official GGPO website:
Rollback networking is designed to be integrated into a fully deterministic peer-to-peer engine. With full determinism, the game is guaranteed to play out the same way on all players computers if we simply feed them the same inputs. One way to achieve this is to exchange inputs for all players over the network, only execution a frame of gameplay logic when all players have received all the inputs from their peers. This often results in sluggish, unresponsive gameplay. The longer it takes to get inputs over the network, the slower the game becomes.
In rollback networking, game logic is allowed to proceed with just the inputs from the local player. If the remote inputs have not yet arrived when it's time to execute a frame, the networking code will predict what it expects the remote players to do based on previously seen inputs. Since there's no waiting, the game feels just as responsive as it does offline. When those inputs finally arrive over the network, they can be compared to the ones that were predicted earlier. If they differ, the game can be re-simulated from the point of divergence to the current visible frame.
Don't worry if that sounds like a headache. GGPO was designed specifically to implement the rollback algorithms and low-level networking logic in a way that's easy to integrate into your existing game loop. If you simply implement the functionality to save your game state, load it back up, and execute a frame of game state without rendering its outcome, GGPO can take care of the rest.
For more information about GGPO, check out 👉the official website or 👉the official github repository. A very good pseudocode explanation for general rollback networking can be found 👉in this Gist.
Send Georg Schuppe an E-mail: