Sites

Menu

Port your project to SpatialOS

3. Launch a local deployment

Now you can launch a local deployment of your game. To do this:

Step 1. Make your project use SpatialOS networking

In the Unreal Editor, from the toolbar, open the Play drop-down menu and check two checkboxes:

  • Check the box for Run Dedicated Server
  • Check the box for Spatial Networking

Play options
Image:The Unreal Engine Play drop-down menu, with Run Dedicated Server and Spatial Networking highlighted

Step 2. Launch a local deployment

Before you launch a local deployment, you must:

  • generate schema (which creates entities)
  • generate a snapshot

To launch a local deployment:

  1. In the Editor, on the GDK Toolbar, open the Schema drop-down menu and select Schema (Full Scan).
    Schema
    Image: On the GDK toolbar in the Editor, select Schema (Full Scan)
  2. Select Snapshot to generate a snapshot.
    Snapshot
    Image: On the GDK toolbar in the Editor, select Snapshot
  3. Select Start. This opens a terminal window and starts a local SpatialOS deployment. Your game is ready to play when you see the output SpatialOS ready in your terminal window.
    Start
    Image: On the GDK toolbar in the Editor, select Start
  4. On the Editor toolbar, open the Play drop-down menu.
  5. Under Multiplayer Options, set the number of players to 2 and ensure that the checkbox next to Run Dedicated Server is checked. (If it is unchecked, select the checkbox to enable it.)
    Multiplayer Options
    Image: The Unreal Engine Play drop-down menu, with Multiplayer Options and New Editor Window (PIE) highlighted
  6. Under Modes, select New Editor Window (PIE) to run the game. This starts one SpatialOS server-worker instance and two SpatialOS client-worker instances locally, in your Unreal Editor. The server-worker instance is acting as an Unreal server and the two client-worker instances are acting as two Unreal game clients (as would be used by two game players). You can switch between the two Editor windows to see and interact with each game client.
  7. If the game does not run automatically after selecting New Editor Window (PIE), on the Editor toolbar, select Play to run the game.
    Play
    Image: On the Unreal Engine toolbar, select Play
  8. 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.
    Inspector
    Image: On the Unreal Engine toolbar, select Inspector
  9. When you’re done, select Stop in the GDK toolbar to stop your local SpatialOS deployment.
    Stop
    Image: On the GDK toolbar in the Editor, select Stop

To run a local deployment with managed workers, or a cloud deployment, take a look at the Starter Template guide

You have now ported your Unreal game to GDK.

If you have encountered any problems please check out our troubleshooting and known-issues.

> Next: Logs and modifications



————
_2019-08-02 Page updated with editorial review: updated project.
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