Download

I'll find someway to reward you if you can solve this networking and replication problem

Hello all,

Our game has been significantly delayed because of this issue, and it’s stumped me for months and months. So far no one online has been able to help. Can you?

So here’s the issue. When playing online games the characters teleport around the map. It’s almost as though when you stop walking, or change direction, the server never gets the message, and corrects you to where you would have traveled (this is a hypothesis not fact). This is obviously very jarring. And as of this moment I still do not know what is causing the issue, let alone how to fix it. I’ll fill you in on some more information.

At first we thought it was a network performance problem. We heavily streamlined the networking code and halved the bandwidth. Gameplay online is now buttery smooth when not being teleported. We’ve been testing by playing each other across the Atlantic with usually around 100ms of ping, so that’s not a problem.

We thought at one point it was a problem with the default movement replication code, so we replaced the entire system with adapted code from Unreal Tournament, since the assumption is that it’s far better at movement replication. Surprisingly, not a single thing changed. The teleporting is still present and hasn’t even lessened.

This doesn’t seem to occur when playing LAN, so it must be related to larger ping.

Here’s a log file from a recent test: https://dl.dropboxusercontent.com/u/53792213/HitBoxTesting.log

As I said, no one so far has been able to solve this, and our game is being heavily delayed because it. We don’t have money so I can’t offer monetary rewards. But I could if I would, just so you’d consider helping. If anyone is able to solve it we’ll reward you somehow. If you need anything at all to help solve this do not hesitate to ask, I will make it happen.

If you are stressed for time, just post a quick suggestion so we can try new things. Anything helps in this war against this bug.

Hard to tell from your description. But is it what is referred to as rubber banding?

Have you tried with network prediction turned off completely?
bIgnoreClientMovementErrorChecksAndCorrection = true;
^
In your character movement class should do that.
That will at least let you know if that is what is causing it, then you can trouble shoot it a bit more.

http://error454.com/2015/03/20/ue4/movement/replication/
This is a VERY good guide for you to read.

Perhaps experimenting with different values in this:
class FNetworkPredictionData_Client* UYOURCharacterMovement::GetPredictionData_Client() const

these can be tweaked.
MutableThis->ClientPredictionData->MaxSmoothNetUpdateDist = 100.f; // 2X character capsule radius
MutableThis->ClientPredictionData->NoSmoothNetUpdateDist = 140.f;

Also, a lot of this code changed in 4.11? i think. So perhaps if you replaced anything using UT code, check against what the orig source is in the unreal it repo and make sure you havent messed up anything :slight_smile:

Hey, thanks for the input, it might be related to rubberbanding. Although rather than being pulled back when you get teleported you get pulled forward when you stop or change direction. I’ll try some of your suggestions and see what happens!

You’ll probably want to use the Network profiling tools, since the log isn’t really helpful for testing things like this.

It sounds to me like the bandwidth is being flooded by something, so not all /enough of the data is getting through. UT shares the same player movement replication system as the engine, it just has more movement features.

When you start the teleport are you still moving? If so then you may want to set your pawns velocity to zero just before the teleport. You can use the StopMovementImmediately node if you’re using BP or just zero out the vector in cpp. I had a similar problem. I was teleporting my actor using SetActorLocation() while I was still moving. When my actor appeared at the new position he still had his original velocity so would jump ahead a few units.

To clear up any confusion, teleportation is not the objective here, but the issue. I want the characters to move normally, but they teleport.

Already on it. Unfortunately my net profiler looks like this for unknown reasons:

e7fdfc0357a2377d39055d7fac6295310ea14699.png

However here’s a profiler file anyone wants to have a look at it https://dl.dropboxusercontent.com/u/53792213/AfterOptimisationServerProfile.nprof

I think this link is dead. Is this the same thing? http://error454.com/2015/03/20/ue4/movement/replication

When I integrated UT’s code I pulled any necessary engine code with it. Although I’ll double check and see what’s up.

Are you using 4.10? Net profiler was broken back then I believe

In old version, net profiler has been size to be opened on 4/3 monitor or monitor with high heigth resolution ^^

I’m working on multiplayer and clearly the “engine” movement code is rocking solid and we have no teleport unless the server is CPU saturated or Bandwith saturated.
I hope you can open you net profile log, as it is very useful to track down what happen on the network side

We did a multiplayer test last night but enabling the NetProfiler caused the game to crash. I’ll be looking into it, and also maybe grabbing the NetProfiler from a newer version of the engine (We’re on 4.10). Our ping in the test was around 40 and the teleportation was gone. It’s unsettling since we’ve had this issue for 3-4 months now, and now it dissapears after nothing has been changed. I can only assume it’s because of the ping, but why then is our ping suddenly so much lower?

I’ll try with the forced delay packet lag setting and see what happens. Thanks for all the help guys!

The problem I believe is that the engine didn’t generate the handles properly, so it was the engine itself rather than the profiling tool.

I assume this was fixed in 4.11 or 4.12? Any idea where to look in the engine to get that code?

It was fixed, I have no idea where though!