|
|
|
|
|
by andai
1058 days ago
|
|
Not sure if this is exactly related, since it's beyond my understanding, but it seems game devs have been struggling to get things drawn on the screen at the expected time. (The speaker says things were much more straightforward on the Amiga. Progress works in funny ways!) https://www.youtube.com/watch?v=n0zT8YSSFzw |
|
The main reason is that your game time and the monitor's "time" are not really progressing in sync and even with vsync you are actually reacting on what the monitor did in the "past". This is why it isn't a problem on fixed platforms like the Amiga since you more or less know how fast the system is and can simply use vsync for game updates too (in other words make the game dependent on the framerate and just ensure the framerate is more or less constant, which is easy on fixed hardware but much harder on something like the PC).
FWIW this is still a problem, but at least a "hack" that has become a bit common since the video and article were published (and Croteam also did) is to "smooth out" the time progression by averaging the time deltas of the last few cycles. This doesn't fix the core problem but it makes the "heartbeat" less likely to happen and be noticeable at the cost of -mostly imperceptible- drift between game time and real time (that you can always reset if it becomes too large anyway).