Alrecenk / JSTimelineSync

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

Build example collision detection #24

Closed Alrecenk closed 2 years ago

Alrecenk commented 2 years ago

A demo showing how to perform collision detection and resolution needs to be built because it needs to be done a certain way to be efficient, and it's not obvious.

Resolution should not be done in the same event as detection because it creates a densely connected graph of data dependencies that make catching up from rollback more expensive. Once https://github.com/Alrecenk/JSTimelineSync/issues/21 is completed it should be possible to spawn events for collision resolution (which you'd probably want to do anyway fr hooks) that won't be rerun unless they are actually changed.

A uniform grid or tree is also likely to perform better than a fancier sweep and prune technique because it can be built into the system in a way that creates fewer dependencies.