Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, no, because this article is kinda mostly wrong. Prediction is almost never used. Actual interpolation, however, is. As in, interpolation between 2 known points. What you're doing there is interpolating to handle the deviation between the server tick rate (say, 60 ticks / second), and the clients actual framerate (which can easily be >100fps). But you're always interpolating between 2 server received positions, you're ~never making stuff up in the future.

What actually happens in an FPS game is all clients just operate in the past. They aren't in sync at all, and don't even try to be. Rather, when the client sends something like a shot to the server, the server "rewinds time" to where everyone was ping/2 ms ago for that client & evaluates the state at that point to see if the shot would hit or not.




Ah. I'm painfully familiar with Open Simulator / Second Life clients, which really do extrapolate (although it's called "interpolation" in the code), and not all that well. There's frequent "rubber banding", where the extrapolation guessed wrong and positions snap back on the next update. My contribution to this was a sanity check against a low pass filtered value to put a ceiling on the error.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: