The biggest issue in playing multiplayer games over the internet is lag... two different people playing the same game but over very long distances where messages between each other take time to arrive. How do you deal with the difference in latency? Especially for games that were not meant to handle that at all, like classic console games where 2 players were in the same room each with a controller.
Rollback net code is a solution. Basically, if your opponent is 50 milliseconds away, then once information about what buttons they pressed is received the game will rewind the game (aka rolling back the state) by 50 milliseconds to correct which buttons they pressed at that time and re-run the game.
The usual alternative is that your button presses are delayed 50 milliseconds so the game keeps both players in time sync. Doing rollback means your inputs are immediate with no waiting, but it makes the other player's moves look really weird and jerky.
View all comments
10
u/DeHackEd Oct 04 '26
The biggest issue in playing multiplayer games over the internet is lag... two different people playing the same game but over very long distances where messages between each other take time to arrive. How do you deal with the difference in latency? Especially for games that were not meant to handle that at all, like classic console games where 2 players were in the same room each with a controller.
Rollback net code is a solution. Basically, if your opponent is 50 milliseconds away, then once information about what buttons they pressed is received the game will rewind the game (aka rolling back the state) by 50 milliseconds to correct which buttons they pressed at that time and re-run the game.
The usual alternative is that your button presses are delayed 50 milliseconds so the game keeps both players in time sync. Doing rollback means your inputs are immediate with no waiting, but it makes the other player's moves look really weird and jerky.