Set Network Player Relevancy with respect to Other Network Player

My BattleRoyale Game is going to have 100+ players. And they all are doing a Lot of animations, i want to keep only 30 nearby players in MyPlayer’s view. So that less Network is used and Other than 30 Players no Animation is running.
When far away AActor::Destroyed( ) is destroyed, my Network and Animation processing will be automatically optimized.
UKismetSystemLibrary::SphereOverlapActors( ) this function can give me nearby players in a given radius, i can increase or decrease that circle.
GetSquaredHorizontalDistanceTo(overlappedActor) this function can give me a distance value, based on which i can increase or decrease my radius. I tried to set AActor::NetCullDistanceSquared based on horizontal distance to other Player, but the Destroyed actors does not appear, until i go near to them, i have tried increasing AActor::NetCullDistanceSquared rapidly, but seems only default value 225000000 is working.
APawn::IsNetRelevantFor( ) this can only tell whether a APlayerController is relevant or not, there is no SetMutualRelevancy between two PlayerControllers. What to do, if IsNetRelevantFor( ) returns false?

I’m working on a BR as well. Depending on Map size and Max Sniping distance You’ll want a net cull of at least 1 Km (10,000,000,000). Overall Net cull for characters should be based on the max visible range of them. If you want sniping, then use the max snipe distance + padding for your net cull.

Characters should never be destroyed. You simply shouldn’t get updates about them once out of net cull. Set your render cull distance just under net cull.

Character movement and animations should be, for the most part, deterministic. If it isn’t you need to optimize. So no updates (rep net cull), no anims, logic to process.

I’d recommend implementing the Replication Graph.

1 Like