Net dormancy and Net relevancy

Hello!

Sorry for the delay. For Fortnite’s setup, we have all of our building actors in the world using net dormancy. We set them up in their constructor with:

NetDormancy = DORM_Initial;

which means that when we load in, each building will initially be dormant. We do not use bAlwaysRelevant, as we have far too many actors in our game for that to be viable. Keep in mind that if you want finer control over the relevancy checks, you can either adjust NetCullDistanceSquared on your actors, or directly override IsNetRelevantFor on your actors to do whatever you’d like.

If you’re using dormancy, there are two things you’ll want to keep in mind. One, right before you change any value that is replicated, you’re going to want to place a call to FlushNetDormancy in order to make sure that the clients actually receive the change. Two, to retain its effectiveness, especially during initial load-in, you’ll probably have to do some work on what you actually replicate. In Fortnite, we tried to do a pass that minimizes the chance we’ll have to wake a building out of dormancy during initial setup by trying to structure data such that the client can deterministically figure out some initialization on its own so that we don’t immediately force every actor to awake and negate the point of dormancy in the first place.

I’ll also ping the network team to see if they have anything else helpful to add, I’m just going from our experiences on Fortnite.

4 Likes