4 ms·
Couldn't you separate input from framerate and interpolate based on the input timing? I do this in a reaction-based arcade game I'm working on in Unity with the
by squeaky-clean 4y ago
Couldn't you separate input from framerate and interpolate based on the input timing? I do this in a reaction-based arcade game I'm working on in Unity with their newer input system. e.g. If they input happens 8ms before the current frame, a projectile is "fast-forwarded" by the equivalent of 8ms, and then is in sync with the tickrate. The bigger issue I've run into is since mobile is my primary target, I've found that phones don't report touch inputs more frequently than their screen refresh rate. Works perfectly fine in the desktop build though with 60fps and a mouse with a 8k polling rate though.
- andrewmcwatters 4y agoWe write a general purpose game engine, but some of the predefined classes do have integrations exactly like this. What you're describing is similar to what we do for predicted projectiles, yes. We reused the concept from Team Fortress 2, which is when Valve first implemented the concept, I believe. But the idea is as old as when QuakeWorld first came on the scene. I think I remember Carmack specifically talking about how projectiles wouldn't be predicted in his .plan files, but the overall feel would be much better.
- gabereiser 4y agoThis is correct. QuakeWorld pushed the limits of real-time networking projectile detection by keeping a small history buffer of interpolated data for the server to perform lookups and hit checks. It was never perfect but it was good enough for fast paced QW games. https://icculus.org/~marco/quakec/csqc/prediction.html https://icculus.org/~marco/quakec/csqc/prediction.html https://fabiensanglard.net/quakeSource/quakeSourcePrediction.php https://fabiensanglard.net/quakeSource/quakeSourcePrediction...