4 ms·
Would there be any big issues to rounding the framerate to the nearest number evenly divisible by the physics rate on the fly? I'm meaning run it mostly like ho
by ball_of_lint 10y ago
Would there be any big issues to rounding the framerate to the nearest number evenly divisible by the physics rate on the fly? I'm meaning run it mostly like how he does but allow any framerate and eat the small changes in speed?
- jstimpfle 10y agoMonitor framerates are kinda "fixed". That is, there is no protocol to seamlessly change the framerate.
- wlesieutre 10y agoThough newer gaming screens are adding G-Sync (Nvidia) and FreeSync (AMD) to allow flexible monitor framerates. On a compatible GPU and screen you can display at whatever framerate you need, even a varying one, up to the maximum rate. The screen draws a new frame whenever you give it one. On that sort of hardware (and I'm assuming only in fullscreen mode) you should be able to match your render framerate to a multiple of your physics framerate. Whether you'd want to is arguable. If people noticed it they'd probably complain that maxing render at 140 Hz (assuming 20 Hz physics) on their 144 Hz screen is wasting their hardware. If you're doing it dynamically as physics perf varies up and down, the abrupt shifts in render framerate might be noticeable.
- Mithaldu 10y ago> physics perf varies up and down That sounds like you're advocating variable-length physics steps. Just a warning that that can be hilariously disastrous. Due to the way physics are simulated on computers, the simulation is never perfect, and the same timeframe simulated in 5 steps can give very different results than 1 step.