johanhelsing / extreme_bevy

A low-latency multiplayer action game, showcasing how to implement p2p connections and rollback networking in a web browser.
https://helsing.studio/posts/extreme-bevy
Creative Commons Zero v1.0 Universal
108 stars 10 forks source link

Can we trust time.delta_seconds() ? #2

Closed clinuxrulz closed 6 months ago

clinuxrulz commented 6 months ago

I had a look at the code for bevy_ggrs, and the Time resource seems unmodified by bevy_ggrs (the Time resource just updated by bevy.)

Since two machines could have a different frame rate. I'm guessing we can not rely on time.delta_seconds() for movement. Otherwise the same object will move by a different amount on each machine.

clinuxrulz commented 6 months ago

Nevermind, just saw GgrsTimePlugin.