6 tips for getting started with the SpatialOS GDK for Unity


6 blocks illustration

Ready to get started with SpatialOS for Unity? Here are six tips to help you get your project off the ground.

1. Get set up by deploying the starter project

The open-source first-person shooter (FPS) Starter Project, built using the GDK Core, provides a template for you to try out the GDK and experience the scale that SpatialOS provides.

The starter project will walk you through setting up your machine and how to quickly deploy your first project to the SpatialOS platform. We’ll introduce you to the workflows and tooling you’ll use with SpatialOS, allowing you to get a feel for what it’s like to develop on the platform. You’ll also experience firsthand the scale and multiplayer gameplay that it enables - your game will be able to host up to 200 real or simulated players!

Don’t worry if you have a different project in mind - once you’re set up, you can build any genre of game you want on SpatialOS.

2. Familiarise yourself with the core concepts of SpatialOS

The GDK has been designed to allow you to make use of the native tools and workflows you are already familiar with from Unity. However, there are some development implications you must account for when embarking on your first multiserver project.

Before you get started on your project, we recommend that you familiarise yourself with SpatialOS. Particularly, you should look at the concepts which enable it to support game worlds with more persistence, scale, and complexity than previously possible because they will help you structure your project, both technically and in terms of game design.

3. Take a tutorial to learn how to add your own features

Now you have tried out the starter project and started to get to grips with the background structures of the technology, you’re ready to begin developing your own features.

Following on from the base starter project, the tutorial will walk you through implementing a simple in-game item. This health pick-up grants health to players who walk over it. The amount of health granted is fixed and the health pack is consumed through use, respawning a little later.

This is more advanced than the starter project - but, once you’ve completed it, you’ll be ready to get started on your own project.

4. Choose your starting point and workflow

It’s time to start your own project and the first step is choosing where and how you’d like to begin.

Choosing where you’d like to begin depends on the project you’ve got in mind. You can continue with the FPS starter project as a base, if you wish.

and we’ve already seen our community start to create some exciting games from this starting point or you can start from scratch with our blank project template.

You also have a choice of which workflow you’d like to start your development with: either the traditional MonoBehaviour workflow using GameObjects or the ECS workflow. You can find more details on which workflow is best suited for you on the SpatialOS docs site.

5. Make use of Feature Modules

Feature Modules are small software packages that offer specific game functionality. Available as source code, you can add these to your project.

Improbable’s Feature Modules are all built so that they can scale, meaning they are designed to be resilient to running in a multi-worker SpatialOS deployment. They’ll allow you to quickly remove some frequently encountered obstacles to networked game development, freeing you up to concentrate on game design and gameplay.

The following are the currently available Feature Modules:

  • Build system: An example implementation of how to build your workers.
  • Player lifecycle: Provides logic to manage players logging in and disconnecting from a game.
  • Transform synchronization: Buffers and interpolates position and rotation updates.
  • GameObject creation: A default implementation of spawning GameObjects for your SpatialOS entities

6. Join the community

Finally, if you haven’t already, come and join the SpatialOS community. In there, we have a network of developers already working with SpatialOS alongside the Improbable engineers who built it. They’re always on hand to answer your questions as you get started, collaborate on projects and chat about all things game dev.

You can join us on Discord or head to our forums to get involved.

More solutions. More possibilities.

Explore all IMS solutions