Home › Concepts › Networking

Networking

Multiplayer is a first-class concern rather than a later addition.

Transform replication. BPC_Replication interpolates towards the replicated transform with a tolerance threshold and an adaptive sample rate — roughly 0.06 s while an object is moving, 0.5 s when it is at rest — and replicates with SkipOwner so the player manipulating an object is not corrected by their own data. Subclasses target either the whole actor (BPC_Replication_Actor) or a tagged component (BPC_Replication_Component).

Server RPCs from non-pawns. Unreal normally only routes client-to-server RPCs from the player's pawn. UAFPNetDriver overrides ShouldCallRemoteFunction and ProcessRemoteFunction so any object implementing the marker interface IOutsidePawnRPCInterface may call server RPCs directly. This is installed through AFS_Libraries/Config/Engine.ini, which replaces the default GameNetDriver. BPC_State and BPC_Interaction_Select already rely on it. Multicast and client RPCs are unaffected.

Replicated UI. URenderTargetReplicatorComponent JPEG-compresses a render target and multicasts it. Together with BPC_ReplicatedUI and its "fake UI" registration, this is how one player sees another player's interface.

Standard RPC routing versus AFPNetDriver
diagram_netdriver_rpc.svgStandard RPC routing versus AFPNetDriver
Standard RPC routing versus AFPNetDriver
Transform replication with adaptive tick and owner skip
diagram_replication_flow.svgTransform replication with adaptive tick and owner skip
Transform replication with adaptive tick and owner skip