Improbable Icon

Forums

Movement interpolation techniques

#1

Hi. I would like to know your thoughts about building transform interpolation in multiplayer games using SpatialOS. Well… I understand that interpolation in simple words is a lerp between incoming transform update, and the predicted next transform. Let’s take only position for that matter. If client receives update about some character walking around, it would immidiately apply new position right? Then we should predict movement that will potentially happen with the next update based on velocity. Am I right? Then we can lerp slowly between these two positions. The issue here is latency. How do I know how much time should lerp take? I guess, that there is no unbeatable way to do it, as the prediction might fail at some point if the lag is too big. However, the lerp time should be taken from the previous between-update time slot? If so, can I use receive update time? Or should I synchronize client timer with server timer somehow in order to actually get the accurate send time?

#3

Hey, this is a classic problem in games and there are various techniques. My favourite resource on the topic is Fast-Paced Multiplayer by Gabriel Gambetta, it also contains links to other resources. When it comes to solving it on SpatialOS there might be an added layer of complexity depending on how your game takes advantage of the multi-server architecture. My advice would be to make it work right in a single-server scenario by using tried and tested techniques like the above. Then look at solving edge cases which happen only on multi-server. Those might be very specific to your game architecture but in general tweaking interest management goes a long way.

#4

Wow. Actually this article you posted is amazing, and the real time test thing on the last page is just so amazing for practicing. Thank you !