Like the article and the thread very much, because this is what I have been looking for.
I am a newbie in game development.
From the beginning, I had questions about loop: I was wondering how accurate it would be, and what will happen if one loop is delayed, and how to synchronize between different computers.
Anyway, here is some of my questions:
(1) It seems sleep and timer is not recommended due to their low accuracy. But they do not cost CPU, right?
In "Fixed timestep" example code of the first post, it seems it uses while loop comparing the current time to the desired time point. It is time consuming, but it is claimed by OP that it is more accurate.
Is my above understanding correct?
(2) Regarding OP's "Fixed timestep",
Update is irrelated to the variable time. So what matters is the times of updates.
But render is designed to be dependent on lastUpdateTime.
I do not understand why. I mean, it seems not make sense here.
Thanks again for OP's article!