In June this year, we entered pre-alpha for the SpatialOS Game Development Kit (GDK) for Unity: we outlined the vision of the GDKs and started developing them in the open on GitHub. While we invited everyone to join our community and provide feedback on our direction, we recommended not yet relying on it to build projects.
Today, we are delighted to announce that we have progressed with the GDK and it is now ready to be used for building projects using Unity Engine. Our latest release has the key APIs, workflows, documentation, and supporting resources for you to start building on the GDK. It’s free to get started – we’re really excited to find out what you think of it.
For anyone not already part of our community, here’s a quick summary of SpatialOS. SpatialOS is a platform for creating and running online multiplayer games using our distributed, cloud-based architecture. It’s a fully managed service so we host and scale your game globally. We also provide tools and services for you to easily deploy your game, iterate on its development, measure its performance and understand what’s happening in your game world.
With SpatialOS, you can also implement new kinds of gameplay which the traditional client-server approach would make impossible, by drawing on the power of multiple servers and game engine ‘workers‘ operating seamlessly in the cloud.
Changing the game for Unity developers
We want to make it radically faster and easier to build online games with Unity while also opening up the possibilities for ambitious, unique games and experiences that were previously impossible.
Our cloud-based platform, SpatialOS, helps developers to create games that go beyond the limits of a single server, as well as providing global hosting for any multiplayer game built with the GDK.
The GDK is an integration for Unity developers to leverage SpatialOS. In designing the GDK, we followed four tenets:
- Fast development iteration: Development iteration speed is critically important in creating games; fast iteration means you can focus on finding the fun in your game.
- Native workflows: We know that many game developers are deeply familiar with and experienced in using Unity, so we are building features into our GDK that replicate the native a Unity experience.
- High performance: We are making the GDK as fast as possible. A more efficient integration means more resources are available to both the client and the server; your game uses fewer resources so you can develop more content.
- Customisability and openness: We believe that everyone benefits from open development and code gets better, faster when it’s public. We’re developing the GDK in the open, with publicly available code, so that you can better understand it and directly impact its development.
What’s new in the SpatialOS GDK for Unity
The key parts of the GDK for Unity are now ready to use:
The GDK Core provides APIs and tools to integrate with SpatialOS. It leverages the Unity ECS for improved performance and enables you to write game features using either the ECS or GameObjects and MonoBehaviours.
In the spirit of fast project iteration, the GDK Core enables you to restart your scene in the Unity Editor. This enables you to iterate on developing game code without having to rebuild executables, and lets you run both client and server code in the same Editor instance.
FPS Starter Project
Our brand new, 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.
You can also use the FPS Starter Project as a base to build your own game, so you don’t have to implement a character controller, shooting or transform synchronisation from scratch.
Feature Modules offer specific game functionality. Available as source code, you can add these to your project. The following are the first versions of the first set of Feature Modules:
- Character movement: Handles server-authoritative replication of character movement including WASD, aiming, sprinting and jumping.
- Health: Handles player health, dealing damage, and responding to changes in health.
- Player lifecycle: Provides logic to manage players logging in and disconnecting from a game.
- Shootable weapons: Provides an extensible interface for supporting multiple weapon types, raycast shooting and dealing damage.
- Transform synchronisation: Buffers and interpolates position and rotation updates.
These 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. In the future, there will be many more Feature Modules to add to your game, removing the most significant obstacles to networked game development and so freeing you up to concentrate on game design and gameplay.
To get started, follow our guide to set up the GDK. Then you can deploy the FPS Starter Project to the SpatialOS cloud platform and play the game with up to 200 real or simulated players for free.
We’d love to hear what you think – don’t hesitate to reach out to us on Discord or our Forums.