Best way to do reliable replication?

I’m confused about the reliability of the replication.

This document says that property replication is reliable, but it’s possible that some individual property value changes be skipped. Isn’t that contradictory? I thought being possible to be skipped means unreliable.

This document says that the primary use of RPCs is to do unreliable gameplay events, yet you can specify it as Reliable.

I’m really confused. What should I use if I really want it reliable?

Also, what about the order? For example:

  • If I change 2 properties in the same frame on server, the changes arrive at client the same frame as well?
  • When I call 2 RPCs in subsequent frames, they be called on the remote machine in the same order?
  • What about the combination of properties changes and RPCs calls, are their changes/calls kept same order over network?

My goal is replicate my state machine(in code, not the animation state machine graph) over network. For example, for attack state I only need to replicate aiming target. For jump state I only need to replicate a jump impulse and angle. For walking state I may need to replicate more things such as location and velocity, which is ok to be unreliable… And of course, I need to replicate the current state, which is just an enum/int and doesn’t change much, but when it changes I need it 100% reliably replicated.

So 2 key things for me:

  1. In different state, I have different amount of data to replicate.
  2. I want to replicate them in correct order (e.g., state changes to jump and jump impulse and angle come at the same time).

What’s the best way to achieve these two?

Thanks.

  1. If you change vars on server they not arrive at the same frame to client. even if reliable. you need to code in such a way it not break your functionality. HOWEVER you can put the entire logic on the server side, as it execute in perfect order on the server as programmed. and on client use rep/notify to trigger events on replication of the variables.
  2. if you have lag on the animations on replication its only a few frames. its not noticeable. for animation states you DON’T replicate jump state. you monitor the “grounded” state of the movement component. the movement component acts the same way on client AND server AND owner regardless of the realm it is at. Im doing a tutorials on it right now by the way.

Thanks for the answer. I understand your point that client is just a visual presentation of server logic, and client should use information that is locally available to reproduce the behavior instead of replicating the behavior itself.

But somewhere you’ve got to have some reason to have a reliable replication, as long as it’s rare and small. For example, I have a complex animation blending tree for a acrobatic jump, whose parameters depend on combination of buttons and joy stick directions from autonomous player input. For example, holding stick back and press A, and holding stick forward and press B, as well as the analog value of the stick, all lead to entirely different animations. I want the input information to arrive at the same on server so that it could lead to correct animation, otherwise I may end up starting the wrong animation, and snap to correct animation when the right replications arrive. Then I need to replicate the input combination to simulated machines at the same frame too. What should I do in this case?

And looking forward to your tutorial.