Is it possible to achieve network interpolation with Multiplayer Synchronizer?

Godot Version

4.2.1

Question

I’m using a Multiplayer Synchronizer to synchronize player’s position across the network, but I would like its movement to be smooth. Can this be achieved with the MultiplayerSynchronizer node or do I need to implement myself the synchronization and the interpolation with RPCs for example ?

Thanks a lot for your help !

2 Likes

trying to do the same thing. Using gdscript physics interpolation and multiplayer synchronizer to update the position of the character controller. But if the server owns the player’s character controller the movement is all choppy and stuttery . If the player owns it’s CC then it works fine, nice and smooth, but can’t do that because it would allow the player to walk through walls if the local player removed the walls on their end.

This is not currently implemented in MultiplayerSynchronizer: Add property prediction and interpolation, and a way to capture MultiplayerSynchronization events · Issue #7280 · godotengine/godot-proposals · GitHub

It should be possible to roll your own interpolation nonetheless by having the synchronizer synchronize a player position, but having its visual representation drawn by a separate mesh which doesn’t use this synchronized position, but an interpolated form of it.

2 Likes

Hi I’m curious if you found a solution/workaround for this. I’m currently experiencing the same issue. Player position looks perfectly synchronized with LAN multiplayer. But the position is noticeably choppier in across network multiplayer.

1 Like

if anyone stumbles across this, I’d highly recommend using the Netfox addon for smooth movement in online multiplayer!:

If someone stumbles on the reply above me, there’s another way as well.

You can actually create your own multiplayer systems via RPC nodes and a good bit of know-how. Networked movement, interpolation, a synced client/server clock. Everything.

You just gotta try, fail, ask questions, and learn. Easier said than done, I know that from experience. It’s both easier and harder than it seems; if that makes sense.

I personally find netfox a little troublesome to use, as it’s a separate learning curve from what I already know and a separate codebase than what I’ve already built. Plus, it’s a little difficult to tailor it’s networking systems to my specific game.

That’s why there’s no one-size-fits-all method to networking/multiplayer. Every game is different and has separate needs and priorities that need to be tackled head-on.

Yeah that’s totally fair. I attempted my own interpolation/lag compensation for player movement first but found it was far below what I was able to eventually achieve with Netfox.

I’ll actually be releasing a game on Steam that uses Netfox this month. So for me personally it was well worth putting in the effort to make my project Netfox compatible - and it wasn’t too much of a learning curve to do so at least with my project.

But as you mentioned there’s no one-size fits all of course

Honestly you dont need interpolation. If you synchronize the physics state (input, accelerations, and velocities) you can allow the local physics engine manipulate the synchronized node in between network frames. You will however need to handle network jitter anyway which you will want to buffer network frames. Once you have that you could do interpolation easily, but again you dont need to.

Im working on something that i dont know what to do with yet. Either a tool or a teaching mechanism, feel free to take ideas.