Right now all there is to enforce time rate independence is
let time_diff = time_since_start - last_update;
if time_diff < std::time::Duration::from_millis(15) {
return Ok(());
}
in the update method.
This leads to some possibly noticeable jittering from my testing at limiting it to 30 fps on my 60fps display.
Another problem is that the game will be too slow if the fps is less than 60.
Ideally, everything is done with some Delta resource but I tried implementing it that way and everything got worse. A lot of timers are based off of number of frames passed which is somewhat problematic.
I read some article on frame rate independence a while ago with ggez but I can't find it
Right now all there is to enforce time rate independence is
in the update method.
This leads to some possibly noticeable jittering from my testing at limiting it to 30 fps on my 60fps display.
Another problem is that the game will be too slow if the fps is less than 60.
Ideally, everything is done with some Delta resource but I tried implementing it that way and everything got worse. A lot of timers are based off of number of frames passed which is somewhat problematic.
I read some article on frame rate independence a while ago with ggez but I can't find it
Edit:
List of timing based thing to fix: