O'Reilly logo

Unity Multiplayer Games by Alan Stagner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Entity Interpolation and Prediction

In nearly all games that employ multiplayer networking, entities need to be interpolated to hide lag and jittery updates. While the updates for an entity only arrive relatively few times per second, and may even be dropped if using UDP, the interpolation needs to smooth these and make the final motion appear smooth, and close to the original player's movements.

Previously, we implemented a simple form of interpolation, by simply interpolating toward the current network position. This looks sluggish and artificial in many cases, especially in twitch-style action games where players move quickly and can change direction on a dime. In this chapter, we'll learn how to implement a form of entity interpolation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required