đšī¸Create a multiplayer game
Ask your agent for the match in one prompt, then check that the server owns shared results and that each player gets their own character. The rules behind that request are on How multiplayer works.
Step 1: Describe your match
Say how many players there are, whether they compete or cooperate, how a match starts, and which results the server decides. Health, score, inventory, and a win condition are that kind of result.
Published players enter through a platform queue. Choosing that queue is on Add matchmaking.
Step 2: Ask your agent to build it
In your agent, ask:
Make this game multiplayer using the multiplayer systems.
Each player spawns as a character they control. The server decides shared results. Clients only show those results.
Include the multiplayer scene, one PlayerSpawner, a GameMode, and networked movement through the movement skill.
Make it playable by multiple clients in the editor, and ready to publish through the platform's multiplayer upload.Wait until the agent finishes.
Step 3: Check the scene and the spawner
Ask your agent:
You are looking for a gameplay scene, a GameMode, and one PlayerSpawner.
Every multiplayer level needs that one PlayerSpawner. GameMode.getPlayerSpawner() throws if it is missing. The server and clients share its path. PlayerController, the Pawn, PlayerInfo, and GameSessionInfo spawn through it.
Each joining player gets their own Pawn. That client owns it. Other players can see it.
Objects created while the match is running, such as projectiles or pickups, need a scene-placed MultiplayerSpawner. world.add on the server does not create that object on clients. An object already placed in the level does not need one.
Spawn and despawn only on the server. A client can ask through @ENGINE.ServerRPC(). The server then calls destroy() or MultiplayerSpawner.despawn().
Join order, display names, and who receives a spawn are on Multiplayer reference.
Step 4: Check shared results stay on the server
Ask your agent:
The server decides the result, then updates the shared value. Connected clients, including someone who joins later, show that value.
Step 5: Set the server scene
In Project Settings, set Server Default Scene to the scene the dedicated server loads. Set it even when that scene is the same map the game already loads. A menu and the gameplay scene can still be different scenes. The project stores the choice as defaultServerScene. Save with Ctrl+S / Cmd+S.
A multiplayer upload is blocked until that scene is set. The Upload dialog names the problem and opens Project Settings.
What You've Done
The game has a spawn path for each player, shared results the server owns, and a server scene for upload. How those results and player actions cross the network is on Share state and actions.
Last updated
Was this helpful?

