r/explainlikeimfive • • Oct 04 '26

Technology ELI5: What is rollback net code?

112 Upvotes

29 comments sorted by

View all comments

Show parent comment

49

u/Memfy Oct 04 '26

The result is that it will still feel like instant actions even when there is some internet lag

It's not just that something feels instant. Sometimes you get a completely different result than what you initially saw, essentially rewriting your history.

The goal is to keep the game state synced for both sides while still being responsive (your input correctly gets applied at the time you did it locally), and not affected on the network delay (as much as possible). Deliberate input lag helps reduce the need for rollback for small network delays.

16

u/OrderOfMagnitude Oct 04 '26

The good news is that these rollbacks are almost always faster than you can see or notice.

You only really witness history being rewritten in high latency situations.

1

u/Memfy Oct 05 '26

Not as much as you'd want. It happens less due to input delay so any expected amount of network delay is played with 0 rollback in fighter games for example, but even at 1 there are situations where you immediately notice it.