Humanoid movement replication delays

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I was trying to understand the replication of movement on roblox. There are many posts out there telling me to not create my own system as they will take up alot of memory from the server. What I am trying to do is understand why the client and server are so out of synch on movements.

  1. What is the issue? Include screenshots / videos if possible!

It seems there are two delays involved in sending movement information. The server will always be behind due to replication delay which is fine by itself. The second delay is when the server sends the movement information to other clients. This produces a significant delay. I was wondering how I can reduce this second delay when the server sends the movement information to the client. This is my assumption on how the movement system works based on some observation.

In the first gif we can see how each step leads to a delay. The right side shows the client inputting movement commands with 0 dealys. On the lower left side is the server receiving these inputs and a small delay is observed. The second delay occurs when the server is trying to send this information to the other clients.

https://gyazo.com/39d4942dafd732628ca91a821a55e4ae

In my second gif I have an inverse kinematic script on the client. This script will render all other players (including yourself) by changing motor6dwelds C0. It does not change the position of the character. It was modified from the OP Free R15 IKPF System (Inverse Kinematics Procedural Footplanting).

https://gyazo.com/afa8108c3f927972862403d000612d86
It seems that the render causes higher latency in replication from server to other clients. It might not be that visible when recorded, but the movement was not smooth anymore.

I am wondering if there is any way i could mitigate this second delay. The first delay from client to server is something I don’t plan on mitigating. Is there any way I can reduce this delay?

I know it’s been some time, but have you find a way to mitigate this second delay? I’m currently facing the same problem trying to replicate a snake like movement.

Humanoid movement has some replication delay due to a buffer. This is Roblox trying to accommodate mobile devices.

Here’s a YouTube video showcasing this, and a potential solution:

Spamming remote events with CFrame data is definitely more responsive (you can try it in a live server, Studio doesn’t show that big of a difference).

However, you’ll need to figure out some way to reduce the jittering via interpolation.

As you say, many games outside Roblox solve it by sending transform data every 100ms and interpolate to the new position.
However Roblox sync cannot be just disabled, when player moves, Roblox always forces to replicate the information and so this new solution could be sometimes unstable. Making a non-player character model would probably solve it since player wouldn’t have a client authority over the model.

2 Likes

You can anchor the character and repeatedly call :PivotTo().

But yes, what you said is true. This solution is pretty unstable - especially with unstable internet.