I've been trying to think through how I'd implement rollback networking (to potentially use it in Retro Tank Party) and one thing I've gotten hung up on is how to synchronize tick numbers across peers.
This is the article that I'm basing my implementation off of:
And I think it's working! It skips frames when necessary to keep the two peers in sync.
I should have probably showed this in the video, but the messages that the peers are passing to each other contain only the current local tick number, and then next tick number they expect to receive from the other peer (so, basically, the last tick number they received plus 1). And the local/remote lag and advantage are calculated just from those values.
Subscribe to get an email when new articles or videos are posted on SnopekGames.com!