4 ms·
What would be the best way to throttle fps and ensure compatibility between different refresh rates?
by mahsu 11y ago
What would be the best way to throttle fps and ensure compatibility between different refresh rates?
- moron4hire 11y agoYou count the time since the last update, wait for the time to accumulate over the update threshold, run the update loop with a fixed time-slice enough times to match whole number of frames. Let the carry over perpetuate to the next frame. At 144hz with a fixed time-slice set for 60hz, you'd have one update on the 2nd, 4th, 7th, 9th, 12th, 14th, etc. frames.
- TronPaul_ 11y agoThe best way is usually to not tie game state to frame ticks. See Bethesda's Creation Engine https://www.youtube.com/watch?v=Yuyp-S7FPNI https://www.youtube.com/watch?v=Yuyp-S7FPNI for why that's a bad idea.