Alrecenk / JSTimelineSync

A quick and dirty prototype for testing generalized rollback networking.
MIT License
5 stars 1 forks source link

Don't resend hashes you've verified recently #25

Open Alrecenk opened 2 years ago

Alrecenk commented 2 years ago

Currently synchronize sends all hashes of base objects and manually created events every network update, but this is not necessary. Once a hash has been sent, verified to match, and returned without an update we could not send that hash for a while.

For instance if a base object hash is verified to be identical on both sides we could cache it, when synchronize receives a set of hashes all of those cached hashes will be functionally added to the received list, if the object hasn't changed then no new hash will be sent and the old one used instead.