In this lesson, you will learn how to reduce network overhead by ensuring the server only sends data to clients that truly need it, based on an actor’s spatial and gameplay significance.
In a large multiplayer environment, the server cannot afford to synchronize every single actor to every single client; doing so would saturate the bandwidth and degrade performance. We solve this using Network Relevance and Net Priority.
Network Relevance
An actor is "relevant" if the server deems it important enough to replicate to a specific client. By default, Unreal Engine determines relevance based on distance: if an actor is too far from a player’s camera, the server stops sending updates for it.
You can fine-tune this by overriding IsNetRelevantFor() in C++. This allows you to implement custom logic—for example, ensuring a boss character remains relevant to all players in an arena regardless of distance, or conversely, hiding distant loot drops to save bandwidth.
Net Priority
When the server has multiple actors competing for limited bandwidth, it uses the NetPriority variable to decide which updates take precedence.
- Low Priority (e.g., 1.0): Used for background items like ambient physics objects.
- High Priority (e.g., 3.0+): Reserved for critical gameplay elements like the player character, active projectiles, or mission-critical objectives.
The engine calculates the "Update Frequency" based on this priority. If two actors need an update but bandwidth is constrained, the one with the higher priority will have its data packet processed and sent first. You can adjust this directly in the actor’s constructor:
// Set a higher priority for important gameplay actors
NetPriority = 3.0f;
By prioritizing critical game states and culling irrelevant actors, you ensure the connection remains stable for the gameplay that actually impacts the user’s experience. This surgical approach to data transmission is the foundation of scalable multiplayer architecture.
Key Takeaway: Use IsNetRelevantFor to filter which actors a client sees and NetPriority to ensure the most vital gameplay data is always delivered first during periods of high network congestion.