Open sebcrozet opened 7 years ago
Has there been any progress on this?
It would be quintessential for multiplayer online games.
For most game purposes, exact reproducibility isn't important (especially if you're receiving authoritative updates from a server at high frequency), so you can just synchronize position and velocity by hand.
I agree for the client, but lag compensation requires you to "scroll backwards" in time.
Efficient lag compensation implementations usually don't involve snapshotting the entire world state at every frame, but just reconstructing sufficiently important parts of the past (e.g. player positions). They certainly don't need the ability to restart the simulation from a point in the past, let alone perfectly reproducibly.
Depends on what kind of roll back you're looking for. For Counter Strike, they just keep track of transforms and stuff like ammo/weapon/aim and use those for hit-scan rollbacks.
More complex games with different rules regarding who to "favour" will need to rollback much more. Take Overwatch that has projectiles, it will need to tackle a bit more than just hit-scan + transforms.
Although, there is nothing preventing you to store the values you deem important for a rollback, and re-simulate with said values seeded on demand it would be nice if this was builtin.
I don't think restarting the entire simulation from the past is generally required or appropriate for hit detection, no matter how you're simulating your projectiles.
So what approach do you recommend? Also hit detection was just an example there’s much more to roll back for.
Explicitly capturing whatever transforms you care about to whatever precision you care about and manually driving swept collision detection or ray-casting in the past is straightforward and more efficient than storing a complete reproducible state for every time step, let alone re-simulating the entire world from that point.
Not sure I follow...
If one would need to roll back to a frame (e.g N-30) and run a simulation with new context sent from a laggy client, how would that work with current features?
See the related thread on the forum.