ReaspPro - CoopKit Host Migration

When the host leaves or crashes, another player can host the same map from the last snapshot and the others join, so the group can play on.

CoopKit Host Migration is for listen-server co-op games, where one player's machine runs the match. Three players are pushing crates when the host leaves. The next player in line opens the same map as the new host, with the crates where the last snapshot had them. The third player joins it, and the first host can come back later.

The plugin sends snapshots to every client, notices a lost host and moves the group to a new one. Your part is to create a migration profile, set up Steam or EOS if you use them, host and join through the plugin, mark what must survive and show a message meanwhile. The plugin changes none of your base classes.

Key features

  • Successor order. Better ping first, then join order. If the next host does not show up, another takes over.

  • Checked snapshots. Sent within a bandwidth budget. A client keeps one only if its length and SHA-1 hash match.

  • Crash detection. A pulse every half second reveals a silent host after 5 s by default, not the engine's 60 s timeout.

  • One group, one session. If two players host the group at once, one hands its players over.

  • Repeated migrations. The group can migrate again, and a player who left can rejoin.

  • Light snapshot. SaveGame properties of the game state, players, pawns and tracked actors, and transforms of the last two.

  • Spawned and destroyed actors. Tracked actors spawned in play come back, and destroyed ones stay gone.

  • Your own systems. Your save system and session code plug in through C++ interfaces.

  • Profile data asset. Its editor checks the values and shows what a migration costs.

When the host is gone

The clients return to your project's default map. The next host opens the map from the snapshot, and the others search for the group and join. Your game hears when the host is lost and how the migration ended, so you can tell the players.

The line of hosts

Ping decides the order only when two players differ by more than your tolerance. Otherwise, the player who joined earlier comes first.

A player who steps in as a fallback looks for a better host for a set time.

What comes back

Players return to where the snapshot had them, with their saved values. The host sends a snapshot at a set interval and after a new player joins. Your game can also send one at a checkpoint.

The profile's Summary shows how much play a migration can lose, how long a snapshot takes to send and how soon a lost host is noticed.

Demo maps

Both maps ship with the plugin.

  • Demo map, ready to play. In three windows: host, join, push the crates, leave or simulate a crash, and rejoin.

  • Overview map. Four boards run the plugin's rules. Nothing migrates there.

Tested

Automation tests in the editor on Null (LAN): three players in one editor process, with 150 ms packet lag and 2% packet loss on every connection, three runs. They also cover two migrations in a row, rejoining and two hosts of one group. Times count from the moment the host left or crashed.

  • The host leaves: the new host plays again in 0.1-0.2 s and each other player in 7-8 s.

  • The host crashes (3 s pulse timeout): 3.1-3.5 s and 9.9-11.2 s.

Most of the other players' time is one 5-second Null LAN search plus the join. In a packaged game the new host also loads the map from disk.

Live, with two players in a packaged build on Unreal Engine 5.8, the plugin's driver and a 3 s pulse timeout, each case once. Time until the new host plays again:

  • Steam (two PCs): 0.44 s after the host leaves and 3.3 s after it goes silent.

  • EOS (one PC, two Epic accounts): 2.5 s and 5.3 s.

Limitations

  • Listen servers only: a dedicated server never migrates.

  • Steam and EOS were tested live with two players on Unreal Engine 5.8 only, EOS on one PC. No live test had a third player who finds the new host by itself.

  • On EOS your game logs the player in with an Epic account. The plugin's driver cannot host while the player is in another lobby with presence, such as a party.

  • Play after the last snapshot is lost.

  • The light snapshot does not keep timers, physics velocities, animation state, calls in flight or properties without the SaveGame flag.

Links

Works well with

Each CoopKit plugin works on its own. Connecting them takes a little work in your project.

Technical Information

Features:

  • Successor order. Better ping first, then join order. If the next host does not show up, another takes over.

  • Checked snapshots. Sent within a bandwidth budget. A client keeps one only if its length and SHA-1 hash match.

  • Crash detection. A pulse every half second reveals a silent host after 5 s by default, not the engine's 60 s timeout.

  • One group, one session. If two players host the group at once, one hands its players over.

  • Repeated migrations. The group can migrate again, and a player who left can rejoin.

  • Light snapshot. SaveGame properties of the game state, players, pawns and tracked actors, and transforms of the last two.

  • Spawned and destroyed actors. Tracked actors spawned in play come back, and destroyed ones stay gone.

  • Your own systems. Your save system and session code plug in through C++ interfaces.

  • Profile data asset. Its editor checks the values and shows what a migration costs.

Code Modules:

  • CoopKitHostMigration (Runtime)

  • CoopKitHostMigrationEditor (Editor)

  • CoopKitHostMigrationTests (Editor)

Number of Blueprints: 3

Number of C++ Classes: 32

Network Replicated: Yes

Supported Development Platforms: Windows: Yes, Mac: No

Supported Target Build Platforms: Windows

Documentation Link: https://reasp.pro/projects/coopkit/host-migration/ (newest version; Docs/README.md in the plugin matches yours)

Example Project: None. The plugin includes demo maps: L_HostMigrationDemo, L_HostMigrationOverview.

Important/Additional Notes:

  • Plugin version: 1.0.0

  • Unreal Engine versions: 5.6, 5.7, 5.8

  • Engine plugins required: OnlineSubsystem, OnlineSubsystemUtils

  • Stability checked against: UE 5.6, 5.7, 5.8

  • Listen servers only: a dedicated server never migrates.

  • Steam and EOS were tested live with two players on Unreal Engine 5.8 only, EOS on one PC. No live test had a third player who finds the new host by itself.

  • On EOS your game logs the player in with an Epic account. The plugin's driver cannot host while the player is in another lobby with presence, such as a party.

  • Play after the last snapshot is lost.

  • The light snapshot does not keep timers, physics velocities, animation state, calls in flight or properties without the SaveGame flag.

  • Network: listen server. A dedicated server never migrates.

  • Online services: Online Subsystem Null (LAN) is tested automatically; Steam (two PCs) and EOS (one PC, two accounts) are tested live on Unreal Engine 5.8.

  • Blueprint API and C++ API.