Download

Why MaxSpeed could be faster on Clients than on Server at the same value?

Im developing a grow up system where you start as baby, juvenile, subadult, adult, old.
Each stage have his own max values for walking and sprinting and added, for example, as baby a BaseWalkSpeed to 100 and BaseSprintSpeed to 250.
As Adult, 200 and 500. But what I can see when I play is that Client as Baby can walk and run faster than an Adult playing as Server.

I have to say that Client-Baby max FPS rate is 15-20 and Server-Adult is 70.
Can a difference of FPS make you faster against all logic?
How can I skip that problem and make Client run as its proper speed?

Thank you.

Did you check if the speed variables are updated in both Server and Client with the same value?

Well, I was going to say you Yes but have been doing a deep test and have to say definitively No. I use playerstate as bridge to send variables values to characters.
That values were fine but discovered that the real values was failing and changing. Also I use MSGT as base and still learning the structure he did, now I see I should use movement component inside controller.

Let me ask you something, when would you use multicast and when replicate it and when replicate with notify?
For example, multicast when you eat a plant or roar or attack, replicate when you change a variable like run or walk and with notify when you get Old and your grey hair spawns over the model or you stop bleeding and old wounds become scars? I wish I could pm you and ask you things about networking.

Replicated variables denotes Network States of an Actor while Multicast denotes Network Events on an Actor. The difference is that Events can be unreliable and may or may not be sent to the client at all. The network state could arrive eventually (note that only the most recent state will arrive eventually and intermediate states may be skipped).

Events could be used to elaborate on a game mechanic while it happens, and states could be used for the long term changes to an Actor.

If we use an Elevator as an example.

The Network Events on an elevator could be

  • “Call Elevator” button pressed
  • Doors Opening
  • Doors Closing
  • Start Moving Elevator UP/Down

The Network States on the elevator could be

  • Is The Doors Open?
  • Enum MovementState (Going Up, Going Down, Stopped)
  • Height or Level

Thnx garner!

This tutorial by Epic should help you along a bit.