FFastArraySerializer order

comment in fast array header states:

“the order of the list is not guaranteed to be identical between client and server in all cases.”

anyone knows what are those cases? I have an array of structs that is initialized at begin play and then no adds or removals but updates almost on tick and order is important.

If you have an array that is “static” (in the sense that no elements are added or removed, even if existing ones have individual properties that get changed over time), then you should be fine - my experience with fast arrays is limited, but from what I’ve seen, server-to-client (and client-to-client) ordering divergence generally doesn’t happen unless you’re actually adding and/or removing elements, particularly in batches. In those cases, differences in the order in which individual indices are processed on the server and client (during replication) can cause the ordering to diverge over time.

With that said, if the ordering is important to you (presumably for identification purposes), I’d recommend adding some way to identify structs by something other than their order in the array - that way, if you do need to add or remove at runtime down the line, you’re not stuck with a system that is unable to support it.

1 Like