Skip to content
TECHNICALLYARTIST
FAB

Multiplayer & Networking

Fog of war is built to be cheat-resistant in multiplayer. The decision about whether you can see an enemy is made on the server, and only the final show/hide result is sent to the client. A client never receives the positions of enemies it should not be able to see.

  • Visibility is decided on the server. Every overlap test and line trace runs with server authority. The reference-counted visibility state (which sources can currently see which enemy) lives only on the server.
  • The client only hides and shows. Each client receives a reliable RPC with the final boolean for a given enemy and toggles that actor’s visibility locally. There is no client-side visibility logic to spoof.
  • Each client sees its own fog. The Fog Manager is relevant only to its owner, so every player gets a fog view from their own character’s perspective, with their own beacons.

In short: the server is the source of truth, and concealment is per-player.

This is the part that trips people up. Local shadows are baked into a render target that is shared across PIE clients running in the same process. With the default PIE setting, two players in one process write to the same shadow target, and one player ends up driving both players’ shadows.

Because the visibility pipeline is server-only, you also cannot meaningfully verify hiding/showing from a single-process PIE “shadow” client; run the clients as separate processes whenever you are validating enemy concealment.

None of this gets in the way of a single-player game. In standalone play the local machine is the authority, so the server-side checks simply run locally and everything works without extra setup.