Let's talk

Test multiplayer at real latency

Four clients on one machine have zero latency and zero packet loss. Your players have neither. Twenty minutes of setup shows you what they see before they write it in a Steam review.

Why PIE lies

Play In Editor runs every client in one process on one machine. Packets arrive instantly and in order. Prediction never gets rejected, RPCs never arrive after the property they depend on, and a replicated value is never late for the widget that reads it.

Real players are 40 to 200 ms away and lose a few percent of packets. Bugs that need latency to appear will not appear in PIE. They show up in QA's first packaged build, or in reviews.

Step 1: emulation in PIE

In the editor, open Editor Preferences > Level Editor > Play > Multiplayer Options:

  1. Set Number of Players to 2 or more.
  2. Set Net Mode to Play as Client. This runs a dedicated server in the background, so no player is the host.
  3. Tick Enable Network Emulation.
  4. Pick the Bad profile, or set Custom values: 60 to 90 ms lag per direction and 2 to 3 % packet loss.

Play. Most "fires twice", "montage only plays for me" and "health bar jumps back" bugs appear in the first five minutes.

You can also change values live from the console in any non-Shipping build:

INIconsole
NetEmulation.PktLag 75
NetEmulation.PktLagVariance 15
NetEmulation.PktLoss 3

PktLag delays the packets this process sends. When server and client each add 75 ms, the round trip is about 150 ms.

Step 2: packaged builds

PIE still shares one editor process and editor-only code paths. Before a milestone, test a packaged Development build. Packet simulation is compiled out of Shipping, so it will not work there.

Two ways to set it:

Config. Paste a profile into Config/DefaultEngine.ini. The server and the clients read the same file and each delays what it sends, so this is about 60 ms round trip:

INIDefaultEngine.ini
[PacketSimulationSettings]
PktLag=30
PktLagVariance=10
PktLoss=1

Leave PktOrder at 0

PktOrder sounds like the way to add reordering on top of lag. In UE 5.3 to 5.8 it replaces the lag instead: in UNetConnection, the PktOrder branch sends the packet and returns before the PktLag step runs. With PktOrder=1 your 150 ms test runs at LAN speed, with no warning. Lag variance already shuffles packet timing.

Command line. Better, because you can switch profiles without repackaging. The free UE Latency Kit has a PowerShell launcher that starts a server and several clients in tiled windows, all with the same profile:

PowerShellRun-Clients.ps1
.\Scripts\Run-Clients.ps1 -Game "D:\Builds\Windows\MyGame.exe" -Map "/Game/Maps/Arena" -Clients 3 -Preset bad

Pass -Server with your dedicated server executable to test the real topology:

PowerShellRun-Clients.ps1
.\Scripts\Run-Clients.ps1 -Game "D:\Builds\Windows\MyGame.exe" -Server "D:\Builds\WindowsServer\MyGameServer.exe" -Map "/Game/Maps/Arena" -Preset awful
PresetRound tripLossWho it models
averageabout 60 ms1 %Nearby region, home broadband
badabout 150 ms3 %Cross-region play, the common Steam review case
awfulabout 250 ms8 %Mobile hotspot. If it survives this, it ships

Step 3: what to look for

Play the moments your game depends on, not a walk around the map:

  • Abilities: double activation, activation on the client with no server effect, cooldown UI that resets. See ability fires twice and predicted cost and cooldown.
  • Animation: montages that play only for the owner, or start late for everyone else.
  • UI: health, ammo or stamina that jumps back after a change. See attribute UI without Tick.
  • World: pickups taken twice, doors that snap, projectiles that appear late or twice.
  • Join in progress: a client joining mid-match sees the right state, not defaults.

Keep the logs. Each process writes to Saved/Logs in the build folder. stat net on screen shows ping, packet loss and bandwidth per connection.

Do not stop at "it feels okay"

Latency bugs are intermittent. Run each risky interaction ten times at the bad preset. One failure in ten is a bug a player hits every match.

Make it a habit

Add one rule to your milestone checklist: no build goes to playtest until it has had 15 minutes at the bad preset with 3 clients and a dedicated server. It costs a quarter of an hour and catches the class of bug that is hardest to diagnose from a player report.

Get the code

UE Latency Kit v0.1.0: three profiles and the launcher script, MIT licensed, no plugin to install.

If the bad preset breaks things you cannot trace, a Diagnostic finds the ownership or prediction cause in two days.

Still desyncing in packaged builds?

Free code fixes one symptom. A Diagnostic finds the cause across your project in two days.