Guarantee replication order

What is the best way to guarantee replication order of Actors ? For most of our maps with replication graph setup we simply use a global node to force replication on things we want to come down first.

Without using replication graph / iris , is there a way to do this ?

Hi,

Regardless of the system being used (rep graph, Iris, etc.), the engine does not provide any guarantees when it comes to the order of replication between actors. Even if actors have their data sent in a certain order on the server, packet loss and latency could cause those actors’ bunches to be received in a different order on the client.

If you have some data on an actor that needs to be received before a different actor can do some handling of its own data, we recommend using OnRep functions and other callbacks to know when each actor has received the replicated data it needs.

For more information, you can check out this knowledge base article on the subject:

[Content removed]

Thanks,

Alex

I hear what you say about packet loss and latency. But what about net priorities and update frequencies as well which generally could be controlled to minimize the amount of time we need to wait for other actor that takes precedence. Is there a way to guarantee server side replication order atleast.

We do have fallbacks for when they are out of order. But too much delay causes shift in when we do certain processing on the client.

I understand there is no guarantee. I think this should be enough o experiment with more.

Hi,

Net priority does allow you to provide the replication system with an idea of which actors are more important than others, allowing these actors to be considered for replication first. Even so, this does not necessarily guarantee any particular replication order between actors for a number of reasons. Actors may have the same priority, or they may have different update frequencies that cause them to be considered for replication on different frames. An actor’s priority may also change based on its position relative to the connection’s view target, the time since the actor was last replicated, or whether or not the connection is saturated.

https://dev.epicgames.com/documentation/en\-us/unreal\-engine/actor\-priority\-in\-unreal\-engine

Iris provides more control over how prioritization is handled with prioritizers, but again, I don’t believe this guarantees any particular order:

https://dev.epicgames.com/documentation/en\-us/unreal\-engine/iris\-prioritization\-in\-unreal\-engine

Like the replication graph, Iris does include a concept of “dependent” actors, where dependent objects will be replicated on updates where their parent is replicated (see UObjectReplicationBridge::Add/RemoveDependentObject). Again, no guarantees are made as to the specific order the actors will be sent/received, but this should help ensure that certain actors are all replicated in the same update. (I believe bandwidth saturation can still prevent dependents from being replicated though.)

Thanks,

Alex