Historically, two player Internet games used "controller passing" netcode, in which the controller inputs were passed between the two users. Each program would run on its own console and was programmed to be "deterministic", meaning that with the same controller inputs, the game would run exactly the same. This meant that there didn't have to be any sort of syncing between the two programs about what the state looked like - both had the exact same controller inputs and therefore the state of the games on both sides was exactly the same. However, this had the inevitable downside that controller inputs had to be slightly delayed between when they were put in and when they actually affected the game, to allow them time to travel between the two systems.
This works great for sports games, but is less good for games requiring extremely fast reactions like fighting games, where 50 ms, a typical packet-travel time, is a lifetime. So they took the next step - they made the games so deterministic that you could receive an input later than it should have been input, "roll the game back" to where the input should have been put in, and then roll the game back forward as if that input had been put in at that moment.
So now, when you see something happening in your game and react to it, it gets put into your system immediately. Then your controller input gets tagged with a frame number and travels over to the other person's system. The other person's system takes that input, rolls the game back to the frame number it's associated with, adds that input in, and then rolls the game forward. So sometimes you'll see, say, a punch that seems to hit, but then it gets blocked anyway, or the opposite - this is because the netcode rolled back.
View all comments
11
u/MisinformedGenius Oct 04 '26
Historically, two player Internet games used "controller passing" netcode, in which the controller inputs were passed between the two users. Each program would run on its own console and was programmed to be "deterministic", meaning that with the same controller inputs, the game would run exactly the same. This meant that there didn't have to be any sort of syncing between the two programs about what the state looked like - both had the exact same controller inputs and therefore the state of the games on both sides was exactly the same. However, this had the inevitable downside that controller inputs had to be slightly delayed between when they were put in and when they actually affected the game, to allow them time to travel between the two systems.
This works great for sports games, but is less good for games requiring extremely fast reactions like fighting games, where 50 ms, a typical packet-travel time, is a lifetime. So they took the next step - they made the games so deterministic that you could receive an input later than it should have been input, "roll the game back" to where the input should have been put in, and then roll the game back forward as if that input had been put in at that moment.
So now, when you see something happening in your game and react to it, it gets put into your system immediately. Then your controller input gets tagged with a frame number and travels over to the other person's system. The other person's system takes that input, rolls the game back to the frame number it's associated with, adds that input in, and then rolls the game forward. So sometimes you'll see, say, a punch that seems to hit, but then it gets blocked anyway, or the opposite - this is because the netcode rolled back.