Re:Game Loop
by binarycrusader on Sunday January 27, 2019 @02:24AM
(#19010730)
Glenn Fiedler gives the best solution to this:
https://gafferongames.com/post/fix_your_timestep/
I’ve had a great experience so far following Glenn’s suggested solution.
Re:Game Loop
by munificent on Sunday January 27, 2019 @02:30PM
(#19013329)
Yes! This article was one of my main inspirations for the chapter.
Speaking of inspirations, looking at the sample PDF on your site, I'm getting some pretty intense Edward Tufte style vibe. Was that intentional?
Re:Game Loop
by munificent on Monday January 28, 2019 @01:48PM
(#19019983)
Oh, yes. <3 Tufte.
Re:Game Loop
by LoSboccacc on Sunday January 27, 2019 @04:20AM
(#19011037)
well this is your basic game loop, and serves as an introduction to the topic. there are lot of things that were just skimped, for example you'd still need an event loop to capture input and store them for the process input method, or you risk losing fast key presses.
For example a falling object will clip in the ground for tens of ms of displacement which is definitely visually significant.
A better solution is to either only interpolate and live with the additional frames of input latency (fine for a lot of games) or resimulate the next physics frame with the new player input, and live with the additional CPU overhead.