Network Client Jitter/Lag

Hey guys!

I’ve been messing around with a networked game for a few weeks now and am doing quite well with it, however I am having a problem in which movement for clients is slightly ‘Jittery’ but perfectly smooth on the server.

A bit of background information and my thought process which you may be able to rule out as incorrect:

The movement is calculated on the server and sent to the clients with a custom run on server node. - Perhaps between each server call the objects velocity is being reset on the client to 0? or the velocity on the Server and client don’t match?

I had camera lag on for each of the actors and after removing it the jitter has been reduced - Perhaps the camera is struggling to keep up to date on the orbs position and is jumping between where it thinks it should be on the client and the position it should be in calculated on the server?

Any help or suggestions i can try to fix this would be greatly appreciated, i currently feel its something to do with the cameras position constantly changing by a minor amount, however the rest of the screen or map doesn’t jitter.

This issue seems to be related to this other question. Any fix, so far?

This is a known issue, but you can script your own movement replication system by using unreliable network events.

  1. Disable “Movement Replication” from blueprint settings of your character

  2. Let everyone share their locations and rotations to server and then multicast new locations from server to clients. Then apply new locations and rotations on clients ends.

You can use smaller vector structures which are available in blueprints, to save network traffic.

Hello

Could you be more specific on how you would create this system that shares the client location and replicates it to other clients?

Thanks

Hey MarCraft, I’m not sure if you were able to figure it out yourself, but i’ll post this for anyone else who wants an example.

Basically, you’re going to want two custom events, one set to replicate on the server (in the details panel) and other will be multicast. You need to have them take input parameters (a vector in my attached example]) and from event tick have the Server event call the Multicast event, passing the vector. In the Multi event you can set the location and it will update the location on clients.