khedoros / uw-engine

Work on Underworld engine
Other
6 stars 0 forks source link

Timing is dependent on framerate #6

Open khedoros opened 7 years ago

khedoros commented 7 years ago

It's useful during development to keep the timing system simple, but not tenable to keep it that way, since we expect cross-platform operation. At the beginning of every frame, I should read the current time, find the diff from the last time update, and update state based on how many 1ms "ticks" have occurred since the last update. That locks it to 1 update period per frame, but simulates performing the correct number of "ticks".