Uploaded January 2016 | Updated September 2026, 2 weeks ago
This video is all about making sure our programs appear to run at the same speed, regardless of the user's hardware. It is not so easy to simply set the frame rate. We can't be sure the computer running our app isn't very low powered, or perhaps it's running a lot of tasks. It might drop frames, our game could might halve its speed.
What we really want to do is scale the movement of objects with an independent time source. It's pretty simple, we just need to record the amount of time between each frame, and scale the movement of our objects by this time.
To record the time, we're using the system's High Precision Timer. This timer is selected by the OS and it will give nano-second accuracy!
Become a patron and support What's a Creel programming vids on Patreon:
patreon.com/whatsacreel
FaceBook:
facebook.com/pages/WhatsaCreel/167732956665435
This video is all about making sure our programs appear to run at the same speed, regardless of the user's hardware. It is not so easy to simply set the frame rate. We can't be sure the computer running our app isn't very low powered, or perhaps it's running a lot of tasks. It might drop frames, our game could might halve its speed.
What we really want to do is scale the movement of objects with an independent time source. It's pretty simple, we just need to record the amount of time between each frame, and scale the movement of our objects by this time.
To record the time, we're using the system's High Precision Timer. This timer is selected by the OS and it will give nano-second accuracy!
Become a patron and support What's a Creel programming vids on Patreon:
patreon.com/whatsacreel
FaceBook:
facebook.com/pages/WhatsaCreel/167732956665435










