Keeps a listen-server co-op game going when its host leaves or crashes. The host sends a snapshot of the world to every client at a set interval. When the host is gone, the first player in the successor order (best ping, then join order) hosts the same map from that snapshot, and the other players join it. The players keep their places and their saved values. Everything after the last snapshot is lost.
- Snapshots in pieces within a bandwidth budget. Each client checks the length and the SHA-1 hash before it keeps a snapshot, and keeps the previous one if a transfer breaks.
- A pulse from the host every half second. A crashed or frozen host is noticed after Pulse Timeout Seconds (5 s by default), not after the engine's 60-second connection timeout.
- A successor order in every snapshot: the best ping first, then the join order. If the next host does not show up, the one after it takes over. If two players host the group at once, the one lower in the order hands its players over, so the group ends up in one session.
- The group survives more than one migration, and a player who left can rejoin it.
- Works on its own with the Online Subsystem (Null on a LAN out of the box). Your own save system and your own session code plug in through two interfaces.
Supported engine versions
Unreal Engine 5.6, 5.7 and 5.8. Platform: Windows (Win64).
Installation
Install the plugin from Fab, then enable CoopKit Host Migration in Edit > Plugins and restart the editor.
Quick start
The plugin ships a demo that is ready to play. Open the map and click Play. You do everything with the mouse, on a panel of buttons in the top left corner of each game window. The panel shows the state of the group and tells you what to do next.
- In the Content Browser, open Settings and turn on Show Plugin Content. Double-click the demo map
/CoopKitHostMigration/Maps/L_HostMigrationDemo, then click Play in the toolbar. - Click Play with 3 windows on the panel. Play restarts with three game windows, each on its own, the way three players start the game. Your Play settings stay as they were.
- In the first window click Host. The panel says you are the host.
- In the second and the third window click Join. After a few seconds of search each panel says it is a client and shows its place in the successor order.
- In the first window click Push the crates. The three crates move, and every window counts the pushes. Wait for the next snapshot, or click Snapshot now. The panels of the clients show the snapshot number.
- In the first window click Leave (the group migrates). The client that hosts next opens the map as the new host at once. The crates stand where the snapshot had them. The other client joins it a few seconds later. Both panels show Last migration and how long it took.
- In the first window click Rejoin the group. The old host comes back as a client of the new host and stands where the snapshot put it.
Click Simulate a host crash instead of Leave to see the pulse at work. The host stops sending anything, and the clients notice after the pulse timeout (3 s in the demo profile).
How the demo is built: the demo game mode uses the Blueprint HUD BP_CKHostMigrationDemoHUD (class CKHostMigrationDemoHUD), which draws the panel and holds the demo profile DA_HostMigrationProfile_Demo. The crates are CKHostMigrationDemoCrate actors with the CKHost Migration Tracked component (named Tracked on the crate). Push the crates moves only these demo crates, not your own actors. The panel is C++, without Widget Blueprints, and calls only the Blueprint API described below.
In your project:
- Create a profile: in the CoopKit Hub (Tools > CoopKit Hub) click Host Migration Profile, type a name in the name field (letters, digits, underscores), then click New Host Migration Profile, or in the Content Browser use Add > CoopKit > Host Migration Profile Data. Give it your own Session Type, so your groups never meet other games.
- Host with Host Session of the
CKHostMigrationSubsystem(a Game Instance Subsystem: get it with Get Game Instance Subsystem) and the profile. Find groups with Find Sessions, then join one of the results with Join Session. A dedicated server never migrates. - Mark what must survive a migration. Properties of player states, pawns and the game state need the
SaveGameflag. Actors on the map also need the CKHost Migration Tracked component. Players' pawns need no component. - Show a message on On Host Lost and hide it on On Migration Finished. The report says how the migration ended and how long it took.
Overview map
Open /CoopKitHostMigration/Maps/L_HostMigrationOverview and click Play. Nothing migrates on this map, because a migration needs one game per player. Four boards run the plugin's rules in a loop, with the plugin's own functions:
- the successor order;
- a real light snapshot of the map, only captured and never applied. It is cut into pieces and checked by length and SHA-1, and one piece is changed on the way, so the check catches it;
- the bandwidth budget with the default profile;
- two hosts of one group.
Stand 5 points to the demo map /CoopKitHostMigration/Maps/L_HostMigrationDemo, where a real migration runs in three windows.
How a migration works
- The host sends a snapshot every Snapshot Interval Seconds and one second after a new player joins. Send Snapshot Now sends one at once, for example at a checkpoint.
- A client notices the loss of the host: the connection closes, or there is no pulse for Pulse Timeout Seconds. In the second case the client closes the connection itself, the way an engine timeout would.
- The engine returns the client to the project's Game Default Map. The client then reads its place in the successor order of its last snapshot.
- Place 0 opens the snapshot's map as a listen server, creates the session with the group's id and the next migration number (epoch), and applies the snapshot.
- Everyone else searches for the group and joins the newest host. A player at place N who finds no host within N times Fallback Seconds Per Rank hosts the group itself.
- For Conflict Watch Seconds such a fallback host keeps looking for a better host of the group. If it finds one, it sends its players there and joins it too.
Measured downtime
Measured by the plugin's automation tests in the editor: three players in one editor process on the Null subsystem (LAN), 150 ms lag and 2% packet loss on every connection, three runs. Times count from the moment the host left or crashed.
| Host | New host plays again | Each other player plays again |
|---|---|---|
| leaves the game | 0.1-0.2 s | 7-8 s |
| crashes (pulse timeout 3 s) | 3.1-3.5 s | 9.9-11.2 s |
Most of the time of the other players is one 5-second LAN search of the Null subsystem plus the join. In a packaged game the new host also loads the map from disk, which the editor does not measure. A snapshot of the demo (three crates, three players) is 1.9 KB in one piece.
Measured on Steam
Measured live on Steam with Unreal Engine 5.8 and Valve's test app 480. Two PCs, two Steam accounts, packaged Development build. Each case ran once. With two accounts the group has two players: the client becomes the new host, and the old host comes back with Rejoin Group. Times count from the moment the host left or went silent.
| Host | Session driver | New host plays again | Old host is back in the game |
|---|---|---|---|
| leaves the game | the plugin's driver | 0.44 s | 2.6 s after Rejoin Group |
| leaves the game | the sample project's driver, built on CoopKit Sessions | 0.49 s | 2.6 s after Rejoin Group |
| goes silent (pulse timeout 3 s) | the plugin's driver | 3.3 s | not measured |
| goes silent (pulse timeout 3 s) | the sample project's driver, built on CoopKit Sessions | 3.5 s | not measured |
On Steam and EOS the plugin's driver hosts the group in a lobby with presence, and a search asks for lobbies. A host that leaves tells each client first and waits until they disconnect, for 2 seconds at most, so they migrate at once. Without this message Steam drops the engine's own close message. The clients then wait for the pulse timeout (3.27 s in our test, reason PulseTimeout).
Measured on EOS
Measured live on EOS with Unreal Engine 5.8 and two Epic accounts. One PC, two instances of a packaged Development build, connected through EOS peer-to-peer sockets. Each case ran once. As on Steam, the group has two players: the client becomes the new host, and the old host comes back with Rejoin Group. Times count from the moment the host left or went silent.
| Host | Session driver | New host plays again | Old host is back in the game |
|---|---|---|---|
| leaves the game | the plugin's driver | 2.5 s | 7.6 s after Rejoin Group |
| leaves the game | the sample project's driver, built on CoopKit Sessions | 2.6 s | 4.2 s after Rejoin Group |
| goes silent (pulse timeout 3 s) | the plugin's driver | 5.3 s | not measured |
| goes silent (pulse timeout 3 s) | the sample project's driver, built on CoopKit Sessions | 5.3 s | not measured |
The new host does not keep the old lobby: it creates a new one for the group, as on Steam. Creating a lobby took about 2 seconds on EOS, which is most of the new host's time.
Two things to know on EOS:
- The plugin does not log the player in. Log the player in to EOS with an Epic account before the game hosts or joins a group. The first login to your product opens Epic's consent page in the browser.
- EOS lets a player be in one lobby with presence at a time. If your game keeps another lobby with presence, for example a party lobby, the plugin's driver cannot host the group next to it: creating the lobby fails with
EOS_Lobby_PresenceLobbyExists. Use your own session driver then (see Your own save system and session code).
What survives a migration
With the plugin's light snapshot:
SaveGameproperties of the game state, every player state and pawn, and every actor with the CKHost Migration Tracked component and its components;- the transform of every pawn and tracked actor, the control rotation of every player;
- tracked actors spawned during play (spawned again from their class) and destroyed during play (destroyed again).
Not kept: timers, physics velocities, animation state, calls in flight, and properties without the SaveGame flag. Everything after the last snapshot is lost. For more, plug in a full save system as the snapshot source.
Data assets
| Data type | What it sets | Validation |
|---|---|---|
UCKHostMigrationProfileData (Host Migration Profile) | session type, players, leave map, snapshot interval, piece size, bandwidth, snapshot limit, pulse interval and timeout, ping tolerance, fallback time per place, migration time limit, conflict watch, snapshot source and session driver classes | a name and a session type are required; Pulse Timeout is at least two pulses; Chunk Bytes 1024-60000; bandwidth 0 or at least 1024; the snapshot limit holds a piece; the time limit is longer than the fallback time; the classes implement the interfaces |
The card's Summary tab says what the profile means in practice: how much play a migration loses, how long a snapshot takes to send, how soon a lost host is noticed.
Host Migration Profile card and the New Host Migration Profile wizard
The wizard creates the profile in its own folder, from the plugin's defaults or from another profile (Start From), with the Session Type you type. A profile refers to no other asset, so its Parts tab is empty.
Your own save system and session code
- Snapshot source. Implement
ICKHostMigrationSnapshotSource(CaptureSnapshoton the host,ApplySnapshoton the new host). Name the class in the profile's Snapshot Source Class, or pass an object to Set Snapshot Source. The plugin sends your bytes as they are and checks their length and hash beforeApplySnapshot. If none is set, the plugin uses its light snapshot (UCKHostMigrationLightSnapshot). - Session driver. Implement
ICKHostMigrationSessionDriver(host, find, join, leave, clean up after a lost host). Name the class in the profile's Session Driver Class, or pass an object to Set Session Driver. If none is set, the plugin uses its driver on the Online Subsystem v1 (UCKHostMigrationOnlineDriver). The plugin advertises the group with session attributesCKHM_TYPE,CKHM_GROUP,CKHM_EPOCH,CKHM_RANKandCKHM_HOST; a driver carries them unchanged.
The CoopKit sample project connects CoopKit Save and CoopKit Sessions this way, without either plugin knowing the other.
Automation tests
Run them in Tools > Session Frontend > Automation with the filter CoopKit.HostMigration:
Protocol.*: the successor order, the pieces of a snapshot and their check (a piece cut short, bytes changed on the way), the bandwidth budget, the session attributes and the choice between two hosts.Net.Graceful: the host leaves, the next host takes over, the old host rejoins, then the new host leaves too and the group migrates a second time.Net.Crash: the host goes silent, the clients notice it by the missing pulse.Net.TwoHosts: two players host the group at once, one hands over, and a search finds one session of the group.Data.ProfileEditor,Hub.*,Workspace.*,Skills.*: the profile, its editor window, the wizard and the hub.Demo.*: the demo with the mouse in three windows, and the Play with 3 windows button.Overview,Showcase.Boards: the overview map with a server and a client (every board plays its loop, its texts fit the board, the client sees them), and the boards' texts without a map.
What is tested
Tested:
On the Null online subsystem (LAN), by the plugin's automation tests in the editor: three players in one editor process, with 150 ms lag and 2% packet loss on every connection. The tests cover a host that leaves, a host that crashes, a second migration in a row, a player who rejoins, and two hosts of one group. The downtime table above comes from these runs.
The demo in three windows with mouse clicks only, by the automation tests (
Demo.*).The overview map, by the automation tests (
Overview,Showcase.Boards): the four boards play their loops, with a server and a client. No migration runs on that map.On Steam, live: two PCs and two Steam accounts on Unreal Engine 5.8 (see Measured on Steam).
On EOS, live: one PC, two game instances and two Epic accounts on Unreal Engine 5.8 (see Measured on EOS).
Not tested live yet:
- Steam and EOS with three or more players. Our live tests had two accounts, so no other player had to find the new host by itself after a migration. The player who came back used Rejoin Group.
- EOS on two PCs, and Steam and EOS on engine versions other than 5.8.
Limitations and known issues
- Listen servers only: a dedicated server never migrates.
- The Null subsystem on a LAN is tested automatically. Steam was tested live on two PCs (see Measured on Steam) and EOS on one PC with two accounts (see Measured on EOS), both with two players on Unreal Engine 5.8.
- On Null a LAN search takes 5 seconds, and a host that searches stops answering searches meanwhile. That is why only a fallback host looks for a second host of its group.
- The new host's world is the snapshot's world. Play since the last snapshot is lost, and so is what the snapshot does not hold (see What survives a migration).
AI agent skills
The plugin includes a skill for AI coding agents. It is called coopkit-hostmigration. It works with Claude Code, and with Antigravity, Codex and other agents that read .agents/skills.
The skill needs a C++ project to build. If your project is Blueprint-only, the skill tells you how to add a C++ class first.
Ask your agent for a change to how your game keeps going without its host, for example "players keep their coins after the host leaves" or "show Reconnecting while the group moves". In Claude Code you can also type /coopkit-hostmigration. The skill adds the change from your own C++ module and does not edit the plugin. If it has to edit the plugin as a last resort, it records the change in CHANGES-LOCAL.md. It also adds an automation test. Then it builds the Editor target with the engine's own build tool and runs the tests.
If the build cannot run, the skill tells you what to do:
- On Windows, install Visual Studio 2022 with the "Game development with C++" workload, including MSVC and the Windows SDK.
- If the editor is open with the project, close it, or press Ctrl+Alt+F11 in the editor so Live Coding compiles the change.
The skill can also edit CoopKitHostMigration data in the open editor, without clicks. The editor module has UCKHostMigrationAgentLibrary, a function library for Python and Editor Utility Blueprints (unreal.CKHostMigrationAgentLibrary in Python). With it the agent lists, creates, describes, validates, exports and imports the data assets and gets the answers as JSON. You can ask your agent, for example: "make a new one, set its values and check it". The editor needs the Python Editor Script Plugin enabled in Edit > Plugins.
In Unreal Engine 5.8, an agent can also call the same functions through the engine's Unreal MCP server, with no Python script. The plugin contains the file Content/Python/init_unreal.py. The editor runs it at start and it registers the toolset init_unreal.CoopKitHostMigrationToolset, so you install nothing in your project. To turn it on, open Edit > Plugins, search for Unreal MCP, tick it and restart the editor. It also enables the Toolset Registry and Python plugins that it needs.
Please note:
- Unreal MCP and the Toolset Registry are experimental engine features. They may change in a later engine version.
- When the server starts, the engine shows a notice that your data is sent to an LLM (an AI language model). Read it before you accept.
- The server listens on
127.0.0.1and has no authentication of its own, so any program running on your computer can call it. Turn it on only on a computer you trust, and only while you need it. - In engine versions without the Toolset Registry, or with Unreal MCP off, the file does nothing and the plugin works as before. The Python route above and the agent skill stay available on every supported version.
Install the skill into your project in one of two ways:
- In the editor, use Tools > CoopKit > Install AI Agent Skills or the Install AI Agent Skills button in the CoopKit Hub window. This copies the skills of every enabled CoopKit plugin into
.claude/skills/and.agents/skills/of your project. It asks before replacing skills that are already there. Replacing removes any edits you made to those skill files. - By hand, copy the plugin's folder
Extras/AgentSkills/coopkit_hostmigrationto<YourProject>/.claude/skills/coopkit-hostmigrationand to<YourProject>/.agents/skills/coopkit-hostmigration. The new folder name has a hyphen. The plugin's folder has an underscore because Fab file names allow only letters, digits and underscores.
Then open your agent in the project folder and ask for the change.
Integration
How CoopKit Host Migration talks to your project and to other plugins without compile-time links.
Gameplay Tags
The plugin defines no Gameplay Tags.
Components
| Component | Put on | Replicated | Notes |
|---|---|---|---|
UCKHostMigrationTrackedComponent (CKHost Migration Tracked) | any actor whose state must survive a migration | no | Migration Id: empty on actors placed on the map (their name is used); Restore Transform |
Interfaces (optional, implement on your objects)
| Interface | Method | Default when not implemented |
|---|---|---|
ICKHostMigrationSnapshotSource | CaptureSnapshot, ApplySnapshot, PollApply | UCKHostMigrationLightSnapshot |
ICKHostMigrationSessionDriver | HostSession, FindSessions, JoinSession, LeaveSession, PrepareAfterHostLoss | UCKHostMigrationOnlineDriver |
Events
| Delegate | Fires on | Payload |
|---|---|---|
OnHostLost | a client that lost its host | ECKHostMigrationLossReason |
OnMigrationFinished | every client that lived through the migration | FCKHostMigrationReport: reason, outcome, place, snapshot, times |
OnStateChanged | this machine | ECKHostMigrationState |
OnSnapshotSent / OnSnapshotReceived | host / client | FCKHostMigrationSnapshotInfo |
OnHostComplete, OnJoinComplete, OnSessionsFound | the machine that asked | success, sessions found |
Replication
| Property / RPC | Condition | Reliable |
|---|---|---|
ACKHostMigrationRelay group id, epoch, pulse settings | always relevant actor of the host | properties |
MulticastPulse | every Pulse Interval | no |
MulticastSnapshotHeader, MulticastSnapshotChunk | every snapshot, pieces within the bandwidth budget | yes |
MulticastHandOver | a fallback host that found a better host of its group | yes |
API
UCKHostMigrationSubsystem (a game instance subsystem, Blueprint category CoopKit|HostMigration): Host Session, Find Sessions, Join Session, Leave Session, Rejoin Group, Send Snapshot Now, Set Snapshot Source, Set Session Driver, Simulate Host Crash (development builds only), Get State, Get Group Id, Get Epoch, Get Successor Rank, Get Last Snapshot, Get Snapshot Age Seconds, Get Last Report, Get Search Results, Get Local Player Key.
Data assets
Create them in the Content Browser: Add > CoopKit. Double-click opens the profile's card (Properties, Summary, Validation, Preview and Parts tabs).
| Data type | What it sets | Validation |
|---|---|---|
UCKHostMigrationProfileData | see Data assets above | see Data assets above |
CoopKit Hub
Data types of CoopKit Host Migration with the CoopKitEntity class metadata appear in the CoopKit Hub (Tools > CoopKit Hub), next to the types of other installed CoopKit plugins. The hub opens on categories, one per entity type. Click one to list its entities, and click < Back to return.
From the hub you can:
- open an entity card: the data editor with Preview and Parts tabs;
- create an entity with the wizard of its type;
- check the project:
IsDataValidof every entity and duplicate ids.
New entities are created in the folder from EntityPathTemplate in the [CoopKit.Workspace] section of Config/DefaultEditor.ini. The default is /Game/CoopKit/{Folder}/{Name}.
Engine plugin dependencies
| Plugin | Required / Optional | Stability (Beta / Experimental) |
|---|---|---|
| Online Subsystem | Required | stable |
| Online Subsystem Utils | Required | stable |
Works well with
Each CoopKit plugin works on its own, and none of them needs another. They share Gameplay Tags, interfaces and the Gameplay Ability System, so you can connect them in your project. That takes a little work.
These plugins go with CoopKit Host Migration:
- CoopKit Save (Fab): Host-side save of the world and every player, also players who join later; slots and versions.
- CoopKit Sessions (Fab): A free plugin to host, find and join, with a lobby, ready checks, join in progress and reconnection.
- CoopKit NetTest (Fab): Network presets for Play In Editor, one-click listen or dedicated server sessions, a stats overlay.
Changelog
See CHANGELOG.md next to CoopKitHostMigration.uplugin and the Changelog section of the Fab listing.