Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🔀Convert a single-player game

A single-player game that already runs in Play mode still makes every decision on that one machine. Multiplayer means the server owns the shared results, and each player gets a character they control. The rules are on How multiplayer works.

Work through the steps in order. Each one links to the page that has the detail.

Step 1: List what every player must agree on

Write down the results that cannot differ between clients. Typical ones are:

  • Damage and health

  • Score

  • Pickups and inventory

  • Objective progress

  • Enemy actions

  • How the match ends

Anything on that list moves to the server. A local-only effect, such as a camera shake, can stay on the client.

Step 2: Add the match scene and the spawn path

The level needs a GameMode, a PlayerSpawner, and at least one PlayerStart. A single-player game that creates its character in code, or drops one Pawn into the scene by hand, does not assign that character to the joining client.

Follow Create a multiplayer game.

Step 3: Replace the movement

Use MovementPawn and the supported movement node. Predict on the owning client, and let the server correct. Keep NetPredictionManager starting in onBeforeBeginPlay when props need rewind.

Follow Networked movement.

Step 4: Move the rules onto the server

Player actions go through a server RPC. Lasting values, including the ones from Step 1, are replicated properties. The client sends the request. The server decides the result.

Follow Share state and actions.

Projectiles, enemies, and other objects created during play go through MultiplayerSpawner. An object added with a normal scene add stays on the machine that created it.

Step 5: Add matchmaking and the server scene

Published players enter through a supported queue. In Project Settings, set Server Default Scene to the gameplay scene before you upload. A multiplayer upload is blocked until that scene is set.

Follow Add matchmaking, then Publish a multiplayer game.

Step 6: Test with two clients, then with an upload

Run at least two clients in Play mode and check ownership, movement, and the shared score. Then upload and play the hosted build with enough people for the queue.

Follow Test multiplayer locally.

What You've Done

The single-player rules that every player must share now run on the server, and each joining player gets their own character. The upload check is the last step on Publish a multiplayer game.

Last updated

Was this helpful?