Multiplayer

How Mowo networks a game - a listen-server co-op model with an authoritative host, replication, RPCs, prediction and an optional dedicated server.

Last updated Oct 26, 2026Edit this pageVersion 1.0.0

Mowo's networking is built for small co-op sessions: a handful of friends, one of whom hosts. The host runs the authoritative simulation, every other machine runs a client copy of the world, and the engine keeps those copies in step. This page explains the model and how a networked frame flows. The pages that follow cover each part in detail.

The network model

The engine is listen-server first. One player hosts and plays at the same time, and that machine is the authority over the world. The hosting player gets player id 1 and peer id 0, and receives a pawn like everyone else, so host and clients run the same code path FNetSession.

  • The host is the authority. A client may send only input, RPCs that pass the authority gate, and acknowledgements. The host owns spawns, destroys and replicated state.
  • There is no host migration. When the host leaves, the session ends and clients return to the menu (HostEndedSession or, after the automatic rejoin attempts fail, HostLost) ENetSessionFailure.
  • A headless dedicated server exists. The MowoServer target runs the same authoritative simulation with no window and no renderer, and hosts through the same session layer with no host pawn. See Dedicated server.
  • Sessions default to five players, host included (FNetSessionSettings::maxPlayers = 5) FNetSessionSettings.
Note

The GameNet module (WebSocket, REST, snapshot sync, match connection) is a separate client library for server-authoritative online titles that talk to a web backend. It registers no systems and is not part of the co-op netcode described here. Its API is listed under GameNet.

Two clocks: the server tick and the snapshot rate

The host runs two independent clocks inside ReplicationManager:

ClockDefaultWhat it drives
Server tick30 Hz (kDefaultServerTickHz)The tick number stamped on every packet, and the lag-compensation history
Snapshot rate20 Hz (kDefaultSnapshotHz)How often the host builds and sends state updates to clients

SetServerTickRateHz changes the tick and SetSnapshotRateHz changes the snapshot rate ReplicationManager::SetServerTickRateHz. Because they are separate, the lag-compensation window stays 15 ticks (about 500 ms at 30 Hz) no matter how often snapshots go out. A frame hitch advances at most four ticks, so a stall cannot flood the history with copies of one pose.

Engine note

The dedicated server passes its --tickrate to SetServerTickRateHz, so on MowoServer the tick follows that flag rather than the 30 Hz default.

How a networked frame flows

ReplicationManager is an ECS system that the scene runs in its runtime and simulation system sets. Each frame, its Update first pumps the session state machine, then runs the host or client half depending on the machine's role.

  1. Transport poll
  2. Replication filter
  3. Session pump
  4. Gameplay systems
  5. Server tick
  6. Snapshot build
  7. Send
Host side. Incoming client input and RPCs are decoded and gated before gameplay runs; the server tick advances the lag history; at the snapshot rate the host sends deltas to each client.

On the host:

  1. The transport delivers packets. The replication filter decodes replication packets, checks the protocol version and schema, and applies authority gates before anything reaches the simulation.
  2. The session pump runs first, so a pawn spawned for a joining player already has a network id when this frame's spawns and snapshots are built.
  3. Gameplay and physics systems simulate the authoritative world, including client moves applied to each player's pawn.
  4. The server tick advances the tick counter and captures a lag-compensation pose for every networked object.
  5. At the snapshot rate, the host builds field-level deltas per client and sends them: continuous fields on an unreliable channel, discrete fields on a reliable one.
  1. Receive snapshot
  2. Apply to ghost
  3. Interpolation buffer
  4. Reconcile own pawn
  5. Predict next input
  6. Send input
Client side. Remote objects are drawn 100 ms in the past from an interpolation buffer; the local pawn is predicted and corrected against the server's acknowledgements.

On a client, remote objects play back from an interpolation buffer 100 ms behind the newest snapshot (FNetSessionSettings::interpolationDelay). The locally controlled pawn is predicted immediately and reconciled when the server acknowledges input. See Prediction and lag compensation.

What replicates

The rule that runs through the design is replicate events and small authoritative state, not their consequences. A networked object is an ECS entity carrying a NetworkObjectComponent NetworkObjectComponent. Its transform replicates by default, and any reflected component field marked MREPLICATED replicates as well. Each player in the session also has a replicated player state record (name, score, team, ping, ready).

Travels on the wireStays local
Transform pose and movement state (continuous, unreliable)Rendering, audio and VFX state
Discrete state such as health, ammo, flags (reliable)Anything a peer can recompute from replicated inputs
RPCs, gameplay events and fast-array deltasTypes without a wire codec (asset references, arrays of strings)

Channels

Every transport exposes four channels NetworkChannel:

ChannelDeliveryUsed for
ReliableReliable, orderedDiscrete state, join and leave, events
UnreliableUnreliable, sequencedTransform snapshots
BulkReliableReliable, unorderedLarge batches, and the chunks of large RPCs
VoiceUnreliable, unsequencedVoice frames, so the jitter buffer can reorder them

Layers at a glance

LayerClassRole
SessionFNetSessionHost, join, leave, players, pawns, travel, gameplay events
ReplicationReplicationManagerSpawns, snapshots, relevancy, RPC gates, prediction bookkeeping, lag history
RPC marshallingFRpcDispatcherSerializes and invokes reflected MFUNCTION calls
PeersNetworkManagerPeer events, send and broadcast
TransportFCompositeTransportENet for IP addresses, Steam P2P for SteamID64 addresses FCompositeTransport

Most games only call FNetSession (or the MNetSessionSubsystem wrapper) and annotate their components. The layers below it are the machinery it drives.

To try multiplayer in the editor, use multiplayer Play in Editor and the Network Debug panel, described in Play in Editor.

Where to go next

Engine sources

This page describes behavior implemented in these files of the engine repository, checked against commit 5922e6e5e.

  • Engine/Source/Runtime/Networking/Public/Networking/Session/FNetSession.h
  • Engine/Source/Runtime/Networking/Public/Networking/Session/NetSessionTypes.h
  • Engine/Source/Runtime/Networking/Public/Networking/Replication/ReplicationManager.h
  • Engine/Source/Runtime/Networking/Public/Networking/NetworkTypes.h
  • Engine/Source/Runtime/Networking/Public/Networking/CompositeTransport.h
  • Engine/Source/Runtime/Networking/Public/Networking/Components/NetworkObjectComponent.h
  • Engine/Source/Runtime/Networking/Public/Networking/Components/PlayerStateComponent.h

Page feedback

Was this page helpful?