Proxy replication rate seems to be dependent on proxy owner client’s FPS or input replication rate
Steps to Reproduce
Hello,
We are using standard CharacterMovementComponent and we noticed that when client has very low framerate (such as 5FPS), this affects the frequency of ReplicatedMovement of his proxy to other clients.
With server-authoritative movement dedicated server is expected to replicate client’s proxy at constant rate, regardless of client’s input replication rate, but this is not what seems to be happening.
Could you elaborate on this please?
Hi,
For player controlled characters, it is expected for the frequency that the server replicates movement data to simulated proxies to be dependent on the frequency that the owning client is sending movement RPCs. A dedicated server will only move a character once it receives a move from the owning client, before it then replicates this movement to simulated proxies.
On the client, these simulated proxies are ticked at a constant rate, with sim proxies using smoothing/interpolation to make movement appear more fluid between these updates from the server.
Thanks,
Alex
Hi Alex,
Thanks for the quick response.
Can I ask if the same approach is used in Fortnite?
I find this very insecure. In classic server-authoritative movement server ticks characters every frame based on last known data and only recevies input from the player to update this data (in a nutshell).
With approach like this it is possible for the client to throttle it’s input frequency and result in choppy movement (proxy character appears teleporting on the screen of other players) when using interpolation or great deal of overshooting, when using interpolation + partial simulation for proxies.
How do you deal with this in Fortnite?
Or, rather, what your recomendations will be for a fast-paced online action game?
Hi,
How this is handled best really depends on the project’s needs and how quickly movement can change.
Changing the smoothing settings, such as NetworkSmootingMode, NetworkMaxSmoothUpdateDistance, and NetworkNoSmoothUpdateDistance, is useful for controlling how movement appears for simulated proxies. If further control is needed, you can override functions like ACharacter::OnUpdateSimulatedPosition or UCharacterMovementComponent::SmoothClienPosition.
Thanks,
Alex