C++ worker SDK
The C++ worker SDK is for writing workers using C++.
What the C++ SDK includes
The SDK provides functionality to write a worker that:
- connects to a SpatialOS simulated world (see Connecting to SpatialOS)
- can subscribe to information for a part of the world (see Handling data received from SpatialOS)
- can send and receive component updates (see Sending data to SpatialOS)
A typical C++ worker uses both the core API defined in
<improbable/worker.h>, and C++ generated code
based on the user-specified simulated world schema.
See Compiling a C++ worker for what to include.
Using the C++ worker SDK
The most important units of functionality in the C++ worker API are:
worker::Locator, which is responsible for querying for and connecting to remote cloud deployments.
worker::Connection, which represents a worker’s connection to a SpatialOS simulated world.
worker::Dispatcher, which is responsible for invoking user-provided callbacks based on data received from SpatialOS via the
worker::Entity, which is a container for the component data associated with a single entity.
worker::View, which is an optional drop-in replacement for the
worker::Dispatcherthat additionally maintains a map from entity ID to
For more, see
<improbable/worker.h>, the C++ API reference documentation,
or the pages under “Using the C++ SDK” in this section.
C++ blank project
You can use the C++ blank project as a starting point for a project using the C++ SDK, or to add a C++ worker to an existing SpatialOS project.
Game engine integrations
The APIs are lower-level than the a game engine integration like the Unity3D integration.
If you’re using a game engine we don’t have an integration with, you can use this SDK to integrate that game engine with SpatialOS. See Integrating an engine for details.