1. How it works

To set up your game with SpatialOS, you use the SpatialOS Game Development Kit (GDK) for Unreal. The GDK is an Unreal Engine fork and plugin with associated projects. It provides features of SpatialOS within the familiar workflows and APIs of Unreal.

Networking switch

In Unreal, game clients communicate with the game server using Unreal’s networking code. The SpatialOS GDK for Unreal plugin replaces this networking code. You can switch between Unreal networking and SpatialOS networking from the toolbar in the Unreal Editor.

The GDK for Unreal extends Unreal’s UIpNetDriver (which orchestrates replication) to create a USpatialNetDriver. This handles the connection between the GDK and SpatialOS, and translates Unreal’s native replication updates and RPCs into instructions that SpatialOS can follow. The GDK does this by using the UnrealHeaderTool to generate reflection data that it then turns into the SpatialOS data format called schema.

Image: The SpatialOS GDK for Unreal networking switch.

GDK for Unreal features

The GDK provides a networking integration with SpatialOS, which enables Unreal Engine 4 (UE4) clients and servers to communicate with the SpatialOS Runtime to synchronize state.

Using the GDK, you upload your built-out UE4 server binaries to SpatialOS, which runs them in a game instance. You can also upload clients to SpatialOS and distribute them to players using the SpatialOS Launcher for early playtesting.

In addition, you can integrate systems from outside the game instance, such as inventory, authentication, and matchmaking.

Next: 2. How the GDK for Unreal fits into your game stack


Last edited on: July 12, 2021 (5638822a)