5 ms·
> For many games variable timestep is a good choice. It really isn't.
by kookamamie 1y ago
> For many games variable timestep is a good choice.
It really isn't.
- pusewicz 1y agoYou can use fixed time step. Choice is yours.
- OnionBlender 1y agoWhat's funny is that searching for "cute framework fixed timestep" in Google points to this Hacker News thread as the first result. What I would have wanted to find is this page: https://randygaul.github.io/cute_framework/#/topics/game_loop_and_time?id=fixed-timestep https://randygaul.github.io/cute_framework/#/topics/game_loo...
- pusewicz 1y agoLOL
- kookamamie 1y agoVery sorry about that :D
- all2 1y agoIf you divorce the game's time-step from your math it isn't too much of an issue. You just need to keep track of the time-delta so you have it for your calculations.
- kookamamie 1y agoGaffer has summarized most of this quite well years ago. E.g. https://gafferongames.com/post/fix_your_timestep/ https://gafferongames.com/post/fix_your_timestep/
- 90s_dev 1y agoCare to elaborate?
- kookamamie 1y agoAssuming the timestep refers to the parts of code dealing with game logic updates, such as physics or motion, variable-sized steps tend to cause nasty issues. Collision detection is an example, where variability is undesired.
- pusewicz 1y agohttps://randygaul.github.io/cute_framework/#/topics/game_loop_and_time?id=fixed-timestep https://randygaul.github.io/cute_framework/#/topics/game_loo... You can request a fixed timestep, and your own loop callback will be called at fixed intervals, which allows you to completely ignore delta time.