News for hackers. Stuff that matters.
Re:Game Timers: Issues and Solutions (2012) by TheHideout on Tuesday August 17, 2021 @09:38AM (#28209695)
Related: If anyone is interested, I've been working on an ECS based mini-game framework in Rust [0] that runs with this idea. It has a 1200 hz simulation clock, 60 hz rendering clock, and 150 hz physics integrator (Euler). I've also posted some example mini-games that use it [1].

[0] https://github.com/Syn-Nine/mgfw

[1] https://github.com/Syn-Nine/rust-mini-games/tree/main/2d-gam...

Re:Game Timers: Issues and Solutions (2012) by flohofwoe on Tuesday August 17, 2021 @09:42AM (#28209733)
Please note that non-60Hz displays are surprisingly common (not just "gamer monitors" with 120, 240Hz etc..., but also odd refresh rates like 72, 75, 85, 90 and 100Hz)

Ideally the 'render clock' would query the display refresh rate from the operating system, but this is harder than it sounds. The next best option is to measure the frame time, and then round to the next "common" refresh rate (AFAIK that's the only way it works on the web for instance).

Re:Game Timers: Issues and Solutions (2012) by TheHideout on Tuesday August 17, 2021 @09:51AM (#28209823)
Interesting. Thanks for the note.
Re:Game Timers: Issues and Solutions (2012) by vardump on Tuesday August 17, 2021 @10:55AM (#28210525)
Indeed, notably cheap 75 Hz displays have become surprisingly common lately.