Please note that this code has been deprecated and is no longer being supported in any way by Improbable. If you still require the documentation for any reason, please raise a support request and we will see what we can do to help.
About SpatialOS
SpatialOS is a platform-as-a-service from Improbable; it provides managed cloud services that solve common technical and production challenges of creating, iterating on, and hosting multiplayer games. It runs games in a way that lets them scale further, be more complex, and have long-living persistence.
About Online Services
SpatialOS Online Services provide infrastructure around your game's SpatialOS cloud deployment.
This repository provides a suite of example gRPC (with additional HTTP support) services, packages and images. It gives you everything you need to start building online services to support your game on SpatialOS; authentication, matchmaking, or anything else you can think of.
Online Services are as unopinionated and generic as possible because you know best what your game requires. The primary language is C#, but we provide protocol buffer files too so you should be able to re-implement the services in whichever language you choose. The services support gRPC and HTTP.
We encourage you to create a fork of this repository so that you can make whatever customizations you want to it; use it as a base, rather than a comprehensive one-size-fits-all solution.
Trying to find something quickly? Below is a list of services, packages and sample configuration files included in this repository.
A selection of deployable services for authentication, matchmaking or other functionality.
The client-facing interface to the matchmaking system. Exposes two gRPC services: the Gateway service and a Long-running Operations service.
The matcher-facing interface to the matchmaking service. Exposes a GatewayInternal gRPC service - with the default configuration this is only exposed to other services on the Kubernetes cluster.
A separate, but related, service to the matchmaking system. Provides operations for the management of parties and invites to those parties. Exposes Party and Invite gRPC services.
A simple authentication server which validates a provided PlayFab ticket and returns a Player Identity Token (PIT).
A set of sample deployable containers, demonstrating how one might go about building different functionality.
A long-running process, deployed in your cluster, which will maintain a pool of ready-to-go deployments. Useful in session-based games where deployments are created and removed often.
A very naive Matcher implementation in C#. Useful for demo-ing the matchmaking system and for seeing the rough structure of how a Matcher is implemented.
A simple client which can be used to demo the PlayFab auth and matchmaking systems, or validate that they are working.
All packages are namespaced with Improbable.OnlineServices.*
. You can find these on NuGet if you like, but they're also included in this repo and imported as ProjectReference
s in the example services.
A generic C# gRPC server. Provides convenience methods for mounting services and adding interceptors, as well as as logging and support for exporting metrics to a Prometheus instance.
This package doesn't include anything Improbable-specific; you can use it for any C# server.
A base class for implementing a Gateway Matcher.
A collection of classes and utilities for building online services. This includes our data model, database client libraries, Platform SDK, PIT interceptors and more. Include this library if you're building an online service for a SpatialOS game.
A NuGet package of our compiled Protocol Buffers. Used to provide client or server interfaces for each of our APIs.
This software is licensed under MIT. See the LICENSE file for details.
We currently don't accept PRs from external contributors but we do accept bug reports and feature requests via GitHub issues and we welcome feedback on the SpatialOS forums or Discord.