Hi,
I’m running a listen server setup with t.MaxFPS = 60.
On the server side, I have a moving actor that replicates its movement to the client.
When I set NetUpdateFrequency = 60, the movement looks perfectly smooth on the client side.
However, when I apply this setup to multiple moving actors, the bandwidth usage increases and overall performance drops.
My questions are:
-
In this case, how can I maintain the same smoothness between server and client movement without increasing bandwidth usage?
-
Instead of giving every actor NetUpdateFrequency = 60, is there a more efficient approach?
-
Specifically, what’s the best way to balance smooth replication and bandwidth for a 2–4 player listen server scenario?
Also, I’ve tried using VInterpTo for client-side interpolation, but since the moving platform lags slightly behind the server’s position, it causes stuttering when the player stands on it — so I’d really appreciate an alternative solution if possible.
Additional Info:
-
Game Type: 2-player co-op platformer
-
Replication Type: Server controls movement, client visualizes it
-
Test Environment: Listen Server (Steam Advanced Sessions)
-
Goal: Achieve minimum bandwidth usage while keeping both server and client movement equally smooth
Depending on what is moving the best way is to do repnotify states and have each client simulation move the actor, not replicate movement.
Short distance moves/rotations are definitely best suited for the repnotify process. Long distances may require periodic sync snaps from the server. Yet again it really depends on what you are moving.
As you can already see replicated movement requires high frequency of updates. The more players and moving actors, the more bandwidth.
If you are using the Character class then you have to remember that client movement is well ahead of the server. Client-side prediction + ClientSendMoveDeltaTime (def 16ms)
Sim movement is always behind by a fairly large margin, but it gets network smoothed.
RPCs aren’t always sent immediately. They are usually bundled with the client move data. You can override this in C++ to force on next tick though. This will eat bandwidth though.
As an example, if you interact with a door, you send an rpc to the server to interact, then set the doors new state. New state gets replicated and the Onrep function executes. This function calls the local event to open/close the door based on the new state.
Servers door is already well into that transition. Even with replicate movement its door is well ahead of yours. Your door will always be server tick + 50% your ping (minimum) behind the servers.