[Tutorial/Video] The ReplicationGraph - Overview, How to write your own ReplicationGraph

In 4.21 the ReplicationGraph was released in Unreal Engine as it had been an experimental feature in 4.20. When I first heard about the ReplicationGraph in 4.20, it came clear that we were going to need this feature in our project.

So I took the time to learn the ReplicationGraph a few months ago with very limited documentation. And to this day the documentation is still limited, so I though I’d change that.


I made a video where I breifly go over the replication graph and I show how I usually like to write ReplicationGraphs for my games.
I Also provide the source of the Project that I wrote and also a template ReplicationGraph that you can use for your own games. 

It's quite a long video but there's a lot to cover. There are timestamps in the video description.

**Topics covered in the video:**  

  1. *Adding ReplicationGraph to a project*
  1. *Creating our ReplicationGraph Nodes*
  1. *Handling routing actors into different nodes*
  1. *Determine how actors are routed*
  1. *Setting Special settings explicitly for actors (ReplicationInfo Data)*
  1. *Creating a custom Always Relevant Connection Node*
  1. *Handling Level Streaming in the ReplicationGraph*
  1. *Adding and Removing actors from the DependantActorList*
  1. *Adding the gameplay debugger to the ReplicationGraph*


https://youtube.com/watch?v=7P11RwKfuEM

**GitHub source:**
https://github.com/MazyModz/UE4-DAReplicationGraphExample

The ReplicationGraph is a high-level server optimization feature. And it is essentially responsible for creating lists of actors that a specific connection should receive network updates from.
And the way it generates these lists is that actors go through the RepGraph and are then routed into these different “Nodes” depending on what the actor is.
In these “Nodes” the actor then get’s handled differently depending on what the Node is. This is explained more in the video.


Useful docs for the ReplicationGraph:
https://docs.unrealengine.com/en-US/Engine/Networking/ReplicationGraphhttps://youtube.com/watch?v=CDnNAAzgltw

If you have any questions about the ReplicationGraph feel free to comment and I will do my best to answer them!

*~ Dennis “MazyModz” Andersson *

3 Likes

Thank you very much.

You, sir, are a hero!

Any idea why it crashes if I move too far away? Says ClassInfo doesn´t exist for a specific BP class

Thank you for this. Implementing rep graph now and your contributions are still some of the best references avaliable.