Me and a friend are working on top down multiplayer game. We were working on the movement and it seemed fine in the engine. Then we wanted to test a build. While we were playing the build we noticed that the client stutters while moving, the server works perfectly fine. And this only happens when we use a build. In the engine it also works.
In your first video I see some sort of dash, is that an ability or how do you do that ?
In editor while testing type this command NetEmulation.PktLag 100 this will simulate ping, and see if you get the same issue.
Yeah we also have some kind of dash ability. I will send you the entire script which also includes the dash. We will try the command.
When we use the command, the server still works perfectly fine but the client has extreme stuttering. kind of the same we had in the build for the client but even extremer.
The issue is with movement prediction in the character movement component, the way you need to implement this dash is by extending the character movement.
I suggest checking this YouTube series
Another way which is probably not recommended is to ignore correction checks briefly while doing a fast move such as a dash, I would also do the dash client side as well to stay in synch as much as possible.
I will certainly look into the video you reccomended. Our first focus was the fix the stuttering for just walking. Do you think the dash causes the stuttering for the walking? It would find it very weird if the dash is the reason that the walking also stutters.
Moving without dashing shouldn’t cause any stutters, make sure the Move function is only executed client side by the local player.
While in editor, with the ping command I mentioned before, also execute this command p.NetShowCorrections 1
This will show server corrections when there’s desync.
Another reason for those corrections could be a mismatch between server and client movement speed, make sure both have the same max walk speed in character movement component especially if you update that dynamically like sprinting, the same speed has to be set in both.