Crossplay Integration Kit
Multiplayer

Host migration

Keep a listen-server match alive when the host leaves or drops, on EOS, Steam, crossplay, sessions and Direct IP

Host migration

A listen server dies with its host. Host migration elects another member, makes it the new listen server, brings everyone else across, and (in Seamless mode) puts the world back the way it was. UCIK owns every step — the service election, the address of the new host, the travel — so nothing has to be wired up per platform.

Set the mode in Project Settings › Betide › Crossplay › Host Migration:

ModeWhat UCIK does
OffNothing. The engine returns everyone to the default map.
Manual (default)Detects the loss, runs the election, fires the events below and exposes the nodes. Your game decides what to do.
SeamlessElects, hosts, reconnects everyone behind the migration screen and restores tagged actors. No game code needed.

What each provider gives you

ProviderElectionHandoverNotes
EOS lobbiesThe service promotes a new owner (UCIK creates lobbies with host migration allowed)Hand Over HostOwner change arrives as EOS_LMS_PROMOTED
Steam lobbiesThe service promotes a new owner, alwaysHand Over HostNo owner event on Steam; UCIK diffs the owner on every lobby update
Crossplay (EOS primary + Steam mirror)The primary service electsHand Over HostThe member that owns the mirror on its own service rewrites the mirror's host data
EOS sessionsNone — a session dies with its ownerHand Over HostUCIK ranks the remaining members instead; the new host announces through session attributes
Direct IPNoneUCIK ranks the replicated peer list; members reconnect to the elected peer's registered address

When the service elects, UCIK trusts it. When it does not, every member ranks the remaining members the same way — lowest measured ping, then earliest join order, then handle — so they all pick the same host without talking to each other.

The sequence

  1. Host lost. A member sees the owner leave the lobby or session, or its own connection to the host fails. UCIK captures the map name and (Seamless) a snapshot of tagged actors while the world still exists.
  2. Electing. The service's owner change, or the ranking, names the next host. OnHostElected fires with bLocalIsElected.
  3. Becoming host. The elected member claims the next epoch on the lobby or session (UCIK_MigrationEpoch, UCIK_MigrationState=Pending), opens the map as a listen server, resolves its own connect string through the transport and announces Ready together with the refreshed UCIK_HostHandle and UCIK_ConnectString.
  4. Waiting, reconnecting. Other members watch the lobby or session for a Ready announcement with an epoch newer than the one they last connected under, then travel to it. If the elected host never comes up, the next candidate is tried up to Max Election Rounds times.
  5. Restoring (Seamless). The new host rebuilds tagged actors before anyone connects and re-links returning players to their pawns.

Epochs stop a stale announcement from the previous host, or two members that both believe they are the host, from splitting the match: only the highest Ready epoch is followed, and a host that sees a newer epoch stands down.

Nodes

NodePurpose
Hand Over HostThe current host promotes another member (best-connected by default, or the one you pass) and can then leave cleanly.
Become HostClaim the next epoch and open the map as the listen server. Empty map reuses the map the lost host was on.
Wait For Migrated HostResolve with the new host's connect string once it announces Ready, or fail after the timeout.
Reconnect To Migrated HostTravel to the announced host, retrying while it is still opening its port.
Run Host MigrationRun the default flow from the current phase (host when elected, otherwise wait and reconnect); completes when the migration ends.
Get Migration Phase, Get Migration Context, Get Last Seen Migration EpochRead the current state.
Get Migration Candidates, Get Migration Peers, Rank Migration Candidates, Elect Migration HostInspect or reproduce the election.
Register Migration PeerDirect IP: tell UCIK where other players can reach the local player. Server only.
Abort Host MigrationStop the current migration.

Events on the UCIK Host Migration Subsystem: OnPhaseChanged, OnHostLost, OnHostElected, OnBecameHost, OnMigrationCompleted, OnMigrationFailed, OnPlayerRestored. Lobby events now also carry the leave reason and the previous owner (see Events).

A typical Manual flow: on OnHostElected, branch on bLocalIsElected — call Become Host on one side and Wait For Migrated HostReconnect To Migrated Host on the other — or just call Run Host Migration.

Seamless state

Add a UCIK Migration State component to any actor whose state should come back:

  • transform and velocity (physics bodies and characters),
  • every UPROPERTY(SaveGame) on the actor and its components,
  • hard references to other tagged actors, re-linked after the restore.

Placed actors are matched in place by a stable id; spawned actors are respawned from their class. Player-owned pawns are handed back to their players as they reconnect (Possess Restored Pawns), and OnPlayerRestored fires so the game can finish the job. Game state and player states restore their SaveGame properties too.

Every member keeps the snapshot (every Snapshot Interval Seconds and at the moment its connection fails), so whoever is elected can rebuild. Only values replicated to that member are known to it: mark the state that matters Replicated as well as SaveGame, and keep server-only secrets out of it.

The overlay shown while this runs is the Migration Screen Widget Class. UCIK ships a plain one; subclass UCIK Migration Screen Widget in Blueprint, implement OnPhaseChanged and OnCountdown, and set your class.

Settings

SettingMeaning
Host Migration ModeOff, Manual or Seamless.
Migration Screen Widget ClassOverlay for Seamless.
Ping Ranked HandoverHand Over Host picks the lowest-ping member.
Host Ready Timeout SecondsHow long members wait for the elected host before trying the next one.
Reconnect Timeout SecondsHow long a member keeps knocking on the new host.
Connection Timeout Override SecondsWritten by Apply Transport Configuration so a dead host is noticed in seconds, not the engine's 60–80.
Ping Publish Interval, Max Election Rounds, Snapshot Interval, Restore Unowned Actors, Possess Restored PawnsAdvanced tuning.

Limits

  • Listen servers only. Dedicated servers do not have this problem.
  • Direct IP needs an address other players can reach (LAN or a forwarded port); the game registers it.
  • Players report their own UCIK handles to the host when they connect. UCIK rejects a second connection claiming a handle already in use and ignores later renames, but it does not verify the claim against the service; a modified client could claim another player's identity and take over that player's restored state. Treat host migration as a co-op feature between players who chose to play together, and keep authority over anything competitive on a dedicated server.
  • EOS sessions are recreated by the new host (a session dies with its owner); followers find the replacement by its owner, so Register Migration Peer is not needed there.
  • The example project (Ultimate Multiplayer Lobby) shows all of it: characters keep their jump count, crates keep their colour and position, and the party screen has a Hand Over Host button.

See C++ usage, Events and Travel and hosting.

Use a unified node first. Use a kit-specific promote node only for that platform's exact option set.

On this page