Skip to content

Package Your Game

A packaged game differs from the editor in ways that matter to a lockstep game. It carries a fingerprint of its simulation content, so players on different builds cannot start a match together. It needs the baked level data the cook collects from each map. And it is the only place reconnection, firewalls and real latency behave as your players will see them.

Package and Play Over a Network does this for the demo. This guide covers the same steps for any project and explains what to check.

  1. Bake each map’s level data. Select the Sein Level Volume in each gameplay map, press Bake Level Data, and save. The bake saves a LevelData_<MapName> asset in the Save Folder (default /Game/SeinARTS/LevelData/) and assigns it to every volume on the level. The cook takes navigation, minimap and fog data from it.
  2. Re-bake after changing a level. A bake made before you moved a wall is stale, and it ships stale. Make the bake part of your release routine. If your version control ignores the bake folder, bake on the build machine before you cook.
  3. Open and save every map in the editor. Placed actors and volumes record their fixed-point positions when a map opens or saves. A placed actor without one fails to spawn.
  4. List the maps. In Project Settings > Packaging, add every map to List of maps to include in a packaged build: the menu map and each gameplay map. The cook follows everything those maps reference.
  5. Cook assets nothing references. The faction picker finds factions by scanning for them, and a faction that no map references is not cooked. Add its folder under Additional Asset Directories to Cook, in the same Packaging settings.
  6. Set the menu map. Set Game Default Map to your menu map and turn Auto-Start Simulation off in its World Settings, or the menu runs a match nobody sees. Set Default Gameplay Map and Main Menu Map under Network / Lobby.

Settings that change the simulation result are hashed into the build identity. A player whose values differ cannot join. They are stored in the project’s config files, and the package carries them, so every player running the same package agrees. Do not hand-edit config on a player’s machine.

Choose Platforms > Windows > Package Project, and use the Development configuration first. Package into a folder outside the project. The same build from the command line:

Terminal window
& "<Engine>\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="<Project>\MyGame.uproject" -noP4 -platform=Win64 -clientconfig=Development -build -cook -stage -pak -archive -archivedirectory="<Output>" -unattended

Read the end of the packaging log for BUILD SUCCESSFUL, and search it for errors. A finished executable does not prove the cook worked.

During the cook, the framework stamps a hash of the simulation content into the package. At run time that hash is part of the build identity:

Build=SeinARTS.11/UE.Network.1A2B3C4D/Content.8F2E...

The three parts are the framework version, Unreal’s network version (which includes the Project Version), and the content hash. A match starts only if every player’s build identity matches. Otherwise it stops at the start with “Player 2 runs a different build, settings or map (build …, map …).”

What the hash covers:

  • Maps, user-defined structs and enums, data tables, curve tables and data assets.
  • Every Blueprint except widgets and animation.
  • Curves and other assets built on a SeinARTS class.

Textures, meshes, materials, sounds, widgets and animation are not in it. A texture change does not split your players. A change to a unit Blueprint, an ability, an effect or a data table does.

The hash is computed from the content’s source, so a client cook, a server cook and a cook for another platform of the same project carry the same value. The cook recomputes it whenever the content changes.

To make an old release incompatible on purpose, raise the Project Version in Project Settings > Project > Description.

Read the identity on any machine, in a build with a console, such as a Development package, with Sein.Net.Status:

  • Content.Uncooked means a process running editor content. It cannot play against a cooked build.
  • Content.NoContentStamp means the build carries no stamp, and the log warns “This build carries no content stamp, so BuildId leaves content out.” Peers then match on build alone, and different content shows up later as a desync. Cook again.
  1. Copy the package to each machine, or run two copies on one machine. Every player must run the same package.
  2. Allow the game through the host’s firewall: UDP port 7777.
  3. Launch each copy with -log to get a console window, and -windowed if you run two on one screen.
  4. Run Sein.Net.Status on each. The Build= lines must be identical.
  5. On the host, click Host. On the other copy, enter the host’s address (127.0.0.1 on the same machine, the LAN address otherwise) and click Join. It takes the next free slot.
  6. Ready both, and start from the host.

A dedicated server also simulates. Build it from the same project so its content hash matches the clients’. Unreal builds a server target from a source build of the engine.

Run every check against the Development package:

  1. Full loop. Play a complete match from the menu to the victory screen and back to the lobby, then host a second match. A first match that works does not prove the loop.
  2. Agreement. Check that both copies show the same units dying, the same resources and the same production. A periodic checksum confirms it: set Desync Policy to Abort the Match with a Report for this test.
  3. Reconnect. Close the client’s window mid-match, launch it again and join the same address. It takes its seat back, as long as the Vacant Seat Policy allows it (by default, at any time). While it loads the host’s state, Is Catching Up is true. The seat is matched by the player’s Unreal net identity, so if a copy on the same machine does not get its seat back, use a second machine. Reconnection cannot be tested in the editor.
  4. Recording. After the match, the host’s Saved/Replays folder holds a replay. Play it on the host with Sein.Net.LoadReplay, and check that every checksum matched. See Record and Play Replays.
  5. Shipping. Package the Shipping configuration and repeat the menu-to-match test. Shipping removes the console, the logs, the on-screen warnings and the debug views, and Sein.Net.SimulateDesync refuses to run. Keep the Development package and its logs for investigating problems.
Symptom Cause
“Player N runs a different build, settings or map” Compare the Build= lines. A different content hash means a different cook or a changed simulation asset. A different UE.Network part means a different Project Version or engine. A different map means players are on different maps.
Content.Uncooked on one machine That machine runs editor content. Use a package.
Content.NoContentStamp The cook did not stamp the package. Cook again and read the log.
Units cannot path, or fog and minimap are missing in the package The level volume has no baked asset, the bake is stale, or the bake folder was not cooked. Re-bake, save, and cook again.
A map or asset is missing in the package The map is not in the Packaging list, or nothing references the asset.
The faction list is empty in the packaged lobby Factions are found by scanning cooked assets. Add their folder under Additional Asset Directories to Cook.
The menu runs a match Auto-Start Simulation is on in the menu map.
The second copy cannot join The firewall blocks UDP 7777, the address is wrong, or the lobby is full (“Server is full”). A started match accepts only a seat’s own player, or a new player when the Vacant Seat Policy opens it.
“Player N built a different tick zero” The same build produced different starting states. Compare the packages’ level data and read Debug a Desync.