Announcement

Collapse
No announcement yet.

What is the best way to smooth player movement for network hiccups? Interp? Ease? (no physics)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is the best way to smooth player movement for network hiccups? Interp? Ease? (no physics)

    Hi folks. So my online multiplayer game has simple 6DOF movement using the floating pawn movement class. When you move in any direction, the speed is 3500 - no acceleration, no physics force. You just go 3500 immediately. I set up my simple server movement replication like so and it works perfectly with a good connection:

    Click image for larger version

Name:	CoreMovementReplication.png
Views:	1
Size:	246.8 KB
ID:	1192480

    But of course, on worse CPUs/network connections it can look jittery. For my case, what is the best way to "smooth" the jitter so that when the affected character's movement replicates to other clients it doesn't jitter or teleport but rather moves smoothly in the predicted vector? I imagine it's one of the VInterp or Ease functions, but I am at a loss where to get a sort of "previous actor location" so that the two vectors I am easing from and to are legit. In other words, Interp and Ease require two vectors to smooth. I can get the current actor location, but what is the other vector I am trying to get? Is there another way to accomplish the fakery I'm trying to achieve?

    For good measure, here are three ways that aren't working really, but are doing something. The Ease function seems to smooth the best but I am basically using the same location from a few ticks before to simulate a "previous" actor location.

    Click image for larger version

Name:	tryingtosmoothbutsucks.png
Views:	1
Size:	422.7 KB
ID:	1192481

    And if you're wondering what the game plays like:


    #2
    Here are the ideas that went through my mind:

    - in the regular CharacterMovementComponent there are several variables that we can adjust regarding network replication, I suggest you check if such variables exist in PawnMovementComponent
    - the "standard" way to do this according to google is to use movement prediction. for instance: you know the character's current velocity so you can predict where he is likely going to be the next frame.
    - Overwatch uses a strange system in addition to their prediction logic: they smoothly "snap" the client to its real location (I literally slide along few pixels with my character)

    Here are my two cents.
    [Released] Multiplayer Combat Editor
    A-RPG Sacred Swords
    Auto-Chess Live Development
    Youtube Tutorials

    Comment


      #3
      Thanks Yun-Kun I will keep investigating those. But does anyone happen to have BP examples of network smoothing/rubberbanding working well?

      Comment


        #4
        Did you manage to find a way to fix your problem with this?

        Comment

        Working...
        X