The Starter Template

2. Launch a local deployment with multiple clients

When you want to try out your game, you need to run a deployment.

There are two types of deployment: local and cloud.

  • A local deployment launches your game with its own instance of SpatialOS, running on your development machine.
  • A cloud deployment runs in the cloud on nodes. A node refers to a single machine used by a cloud deployment. When you have deployed your game, you can share it with other people and run your game at a scale not possible on a single machine. Once a cloud deployment is running, you can connect clients to it using the Launcher.

Use local deployments for small-scale tests, to quickly test and iterate on changes to your project. For large-scale tests with several players, use a cloud deployment.

Step 1: Generate schema and a snapshot

Before you launch a deployment (local or cloud) you must generate schema and a snapshot.

  1. In the Editor, on the GDK Toolbar, open the Schema drop-down menu and select Schema (Full Scan).

  2. Select Snapshot to generate a snapshot.


Step 2: Launch a local deployment and play

This section shows you how to start one SpatialOS server-worker instance and two SpatialOS client-worker instances locally, in your Unreal Editor. The server-worker instance acts as an Unreal server and the two client-worker instances acts as two Unreal game clients (as would be used by two game players).

  1. On the Unreal Editor toolbar, open the Play drop-down menu.
  2. Under Multiplayer Options, set the number of players to 2 and ensure that the check box next to Run Dedicated Server is selected.

    Image: The Unreal Engine Play drop-down menu, with Multiplayer Options and New Editor Window (PIE) highlighted
  3. Under Modes, select New Editor Window (PIE) to run the game. You should see two clients start. You can switch between two Editor windows to see and interact with each game client. If the game does not run automatically after selecting New Editor Window (PIE), on the Editor toolbar, select Play to run the game.

Step 3: Inspecting and stopping play

When your game is running, select Inspector to open the Inspector in your default web browser. The Inspector is a web-based tool that you use to explore the internal state of a SpatialOS world. It gives you a real-time view of what’s happening in a local or cloud deployment.

This will open the Inspector in your browser:

When you’re done, select Unreal Engine’s native Stop button to stop the client.

This stops the running client and server workers but keeps your deployment running.

Step 4: Iterating on your game

As you iterate on your game (i.e modifying classes or blueprints), making changes to replicated components will require incremental schema regeneration. To do this, select the Schema button in the GDK toolbar.


Once you’ve regenerated schema, the GDK will restart the running deployment with the new schema.

If you haven’t modified anything related to replication, you don’t need to regenerate schema and the previously running deployment will continue to be used.

To test your changes, hit play again which will start your client and server workers.

Step 5: Stop your deployment

To fully stop your SpatialOS deployment, select Stop in the GDK toolbar.


> Next: 3: Launch a cloud deployment

2019-08-02 Page updated with editorial review: amended link.
2019-07-16 Page updated with editorial review.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums