4 ms·
Extrapolating up to one physics frame is still not a good solution, it will be noticeable. For example a falling object will clip in the ground for tens of ms
by obl 8y ago
Extrapolating up to one physics frame is still not a good solution, it will be noticeable.
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.
- binarycrusader 8y agoGlenn Fiedler gives the best solution to this: https://gafferongames.com/post/fix_your_timestep/ https://gafferongames.com/post/fix_your_timestep/ I’ve had a great experience so far following Glenn’s suggested solution.
- munificent 8y agoYes! This article was one of my main inspirations for the chapter.
- dullin 8y agoSpeaking of inspirations, looking at the sample PDF on your site, I'm getting some pretty intense Edward Tufte style vibe. Was that intentional?
- munificent 8y agoOh, yes. <3 Tufte.
- LoSboccacc 8y agowell 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.