Replication is unreliable

When replicating an int32 BurstCounter for weapon firing the OnRep isn’t fired ever time it changes, this can be reproduced in ShooterGame with 2 clients simply by firing the weapon; The muzzle effect and other weapon simulation does not always happen and logging shows that OnRep isn’t getting called every time the variable changes.

Edit: After creating a project for ShooterGame in 4.16 this still happens however it is not an issue in 4.15.

This worked completely fine until 4.17. It’s the method used in ShooterGame and other examples for replicated firing and I don’t see any notes about changes so I don’t think it’s intentional.

Oh. I apologize I missed that. Yeah, 4.17 seems to have broken quite a few things. It’s has some great features but we opted out of upgrading after we noticed all the problems that have arisen after its release.

Hopefully, one of the members of the staff can help you.

I just updated from 4.15 to 4.17 and seeing this exact issue in my project. Basically everything that worked online in 4.15 is now broken… As far as I can tell server / client RPC functions work fine, but any replicated variables are not guaranteed to replicate now which breaks online… Here’s hoping Epic has a fix.

Hello,

I’m not seeing the same behavior in my test project when it is upgraded to 4.17. Is anyone able to provide a repro case or a simplified test project that I can use to reproduce the issue? Any further information you can provide is extremely helpful.

Thanks!

It’s an issue with AdaptiveNetUpdateFrequency. I was able to cause the issue in my own project and ShooterGame example simply by playing in the editor with 2 clients and having one of them shoot in front of the other, tap firing will clearly show that the muzzle effect does not replicate reliably.

Simply you could have a replicated variable that updates frequently and just output it’s changes.

Example: https://streamable.com/6t9nq

I’m also having this issue after updated 4.15 to 4.17. It seems that min net update frequency value is used all the time even when networks is not saturated. Increasing min value fixes client lag, but i dont think this is good way to deal with it.

My apologies for the very extended delay on this.

Are you all still experiencing this same behavior in 4.18? I’ve opened Shooter Game and attempted to reproduce the issue that was shown by alexgrist in the video that they linked, but I’m not seeing the same results. Each shot that I fired on the client appeared on the server as expected.

Please let me know if this is still occurring, and we can try to narrow it down so I can get a better idea of what is occurring here.

Thanks again for all of your information.

I just launched the ShooterGame for 4.18 and it still occurs, it’s easily triggered by small single click firing. In another project we had to set net.UseAdaptiveNetUpdateFrequency=0 to prevent it.

Interesting, I’ve done the same just now in 4.18 and I’m seeing it working fine. I’ve attached a video. Have you made any other changes to your ShooterGame files that could be causing this? This is playing in editor with two players, correct?

link text

No changes at all and testing with 2 players. I deleted the project and recreated it for 4.18 before testing again.

After running the project again I have noticed that this only occurs when Client 1 is playing in the Editor Viewport and Client 2 is the new window. Playing 2 clients with New Editor Window doesn’t have this issue which is something I didn’t test previously.

That would be what I was doing differently on my end. I was playing in a new window with 2 players (I find that easier to work with normally when doing MP testing).

Does the behavior happen in a packaged game for you as well? I’d be curious to know if this is strictly limited to in-editor play.

Just packaged up ShooterGame and yes issue occurs with 2 clients, 1 as a listen server.

Replication happens at specific intervals. In the documentation it mentions 1 second but I honestly don’t know the actual interval. In-betweening is performed between replication updates to estimate values.

If you need to update at specific intervals, it might be best to multicast. By using a multicast rpc function you can make updates at whatever intervals you require.

I’ve been able to reproduce this issue on my end, and I’ve entered a bug report. You can track the report using the link below:

Thanks again for your patience and for your report.

Have a great day