Guides
Multiplayer
Replicate marks from the server to every client and late joiner, on listen and dedicated servers, with measured bytes and match results.
Turn it on#
Tick Replicate Marks on the component (the character must replicate) and call Apply Hit on the server only. Calls on a
client do nothing (logged once), so a shared Blueprint graph is safe. A late joiner gets the marks still alive (on a
dedicated server, rebuilt from the newest MaxDecals hits, 64 by default; see below). A mark
removed on the server (cap, wash, RemoveDecal, ClearDecals) is removed on clients.
Listen server#
The server builds each mark and sends a compact record (bone, frame in bone space, size, ids, look seed, material, colour, spawn time, wash, packed pose, morph weights) in a replicated fast array, about 237 bytes per mark (plain mesh; about 273 bytes with two morph weights). Clients build the mark from it. No RPCs, no vertex data.
Dedicated server#
A process that can never render places no marks. It keeps each hit as a raw hit (hit bone, point,
direction and normal in that bone's space, preset, damage, random state, time), 87 bytes per hit, and the newest
MaxDecals hits replicate. Each client places the marks in its own pose with the same ids and random state, so
RemoveDecal(id), ClearDecals, GetSnapshot and RestoreSnapshot on the server reach every client. The hit must come
from the server's own collision result (physics bodies).
Measured results#
Measured on UE 5.8, Mac M5, 8 hits and 50 marks:
| Case | Result |
|---|---|
| Dedicated server, cost per hit frame | 0.002 to 0.018 ms (a listen server that builds the marks: 0.8 to 47 ms) |
| Relay client and late joiner vs listen server | 50 of 50 marks, same bones and materials, centres within 0.009 cm |
| Mark age (fade and dry timing) on clients vs server | within about 0.2 s on average, listen and dedicated, live and late joiners |
| Listen server, client vs server picture | 0.038 % of pixels differ; late joiner 0.010 % |
On a dedicated server the client picture is not guaranteed pixel-identical between clients, because each client places
the hit in its own pose. GetNumDecals on a dedicated server is 0 (the marks exist on clients).
