Release notes for SpatialOS version 13
- 13.8.2
- 13.8.1
- 13.8.0
- 13.7.1
- 13.7.0
- 13.6.2
- 13.6.1
- 13.6.0
- 13.5.1
- 13.5.0
- 13.4.0
- 13.3.1
- 13.3.0
- 13.2.0
- 13.1.1
- 13.1.0
- 13.0.1
- 13.0.0
13.8.2
Released on 2019-07-08
Fixes
Worker SDK in C
Fixed a memory leak caused by the
Worker_AcquireX
andWorker_ReleaseX
family of functions.Fixed an issue in our publishing pipeline, which prevented Android packages from being published correctly in 13.8.0 and 13.8.1.
Fixed an issue where
Worker_Connection_SendAddComponent
would not take ownership of the passed in schema_type when the dynamic components feature is not enabled, which can lead to memory leaks.
13.8.1
Released on 2019-06-12
Fixes
Schema
- Fixed an issue where the schema compiler could hang while processing certain invalid schema files.
13.8.0
Released on 2019-05-30
New features
Schema
- Added a new primitive type called
Entity
that can be used to represent an arbitrary set of components. Note thatEntity
fields can’t yet be used in annotations. If you’re maintaining your own code generator, consult the serialization docs for information on how to serialize and deserializeEntity
fields.
Worker SDK in C
Added a new function
Schema_IsComponentUpdateFieldCleared
which you can use to check whether a specific field ID is marked as “cleared” in this update. This function is a useful alternative if you are obtaining the list of cleared fields just to initialize a data structure for checking whether specific field IDs are cleared.Added some functions for manipulating component updates and component data in a schema-less way:
Schema_MergeComponentUpdateIntoUpdate
Schema_ApplyComponentUpdateToData
Added some functions for copying schema objects:
Schema_CopyComponentData
Schema_CopyComponentUpdate
Schema_CopyCommandRequest
Schema_CopyCommandResponse
Fixes
General
- Restored the install name on macOS binaries to
@rpath/<library name>.dylib
so that they load correctly.
Schema
- Transient fields in schema are now marked as such in the generated JSON AST.
Worker SDK in C#
Code generated by the schema compiler no longer sometimes contains a CS0219 (unused variable) warning.
Generated wrapper types (
Component.Data
andComponent.Update
) now implementoperator==
,Equals
andGetHashCode
correctly. If you are relying onoperator==
to be equivalent to reference equality, make sure to useReferenceEquals(a, b)
explicitly instead.The
port
parameter is no longer ignored when creating anAlpha.Locator
.
13.7.1
Released on 2019-04-16
Fixes
Worker SDK in C
- Fixed a crash that could happen in a networking thread if
default_component_vtable
is assigned to a pointer whose lifetime is less than the connection future.
13.7.0
Released on 2019-04-12
New features
General
- It is now possible to disable chunk-based interest per-worker by removing the
entity_interest
field in the worker configuration JSON file.
Schema
- An exhaustive test schema is now available for use. You may want to run your custom code
generator against this to test it can handle all possibilities. Use
spatial package get schema test_schema_library <sdk-version> <output zip file>
to get this test schema. When invoking the schema compiler ensure a schema path is set to the directory containing the ‘test_schema’ and ‘dependent_schema’ directories (these directories contain the exhaustive test schema).
Worker SDK in C#
Added a new constructor to the
Locator
class in theImprobable.Worker.Alpha
namespace which exposes the port used to connect to a locator service. This allows you to connect a worker to a local locator instance.Added methods to the
Connection
for adding and removing components on entities during runtime. You can use SendAddComponent to add a component to an entity and SendRemoveComponent to remove a component from an entity. In order to use these new methods, you must setConnectionParameters.EnableDynamicComponents
totrue
. When this field istrue
, add and remove component ops are emitted on authority change, i.e. where you would previously receive a component update prior to gaining authority or after losing authority, you are now receiving an add component (if the component exists) or a remove component (if the component does not exist). These ops, like all add and remove component ops, must be treated in an idempotent way (i.e. they replace any existing value on the worker for the component). For a more detailed explanation of using this feature, please see adding and removing components.Added the struct
UpdateParameters
, which can be used to control whether ops sent withConnection::SendComponentUpdate
,Connection::SendAddComponent
, andConnection::SendRemoveComponent
will be added to the operation list of the worker from which it was sent. Setting theLoopback
parameter toShortCircuited
enables this behaviour, setting it toNone
disables it. By default, this value is set toShortCircuited
.Connection.SendComponentUpdate
now takes an optional parameter of typeUpdateParameters
. If this is omitted, theLoopback
parameter defaults toShortCircuited
, meaning that the update will be added to the operation list of the worker from which it was sent. Setting theLoopback
parameter toNone
disables this behaviour. This is useful if updates are applied locally before they are sent.
Worker SDK in C++
Added a new constructor to the
Locator
class in theworker::alpha
namespace which exposes the port used to connect to a locator service. This allows you to connect a worker to a local locator instance.Added functions to the
Connection
for adding and removing components on entities during runtime. You can use SendAddComponent to add a component to an entity and SendRemoveComponent to remove a component from an entity. In order to use these new functions, you must setConnectionParameters::EnableDynamicComponents
totrue
. When this field istrue
, add and remove component ops are emitted on authority change, i.e. where you would previously receive a component update prior to gaining authority or after losing authority, you will now receiving an add component (if the component exists) or a remove component (if the component does not exist). These ops, like all add and remove component ops, must be treated in an idempotent way (i.e. they replace any existing value on the worker for the component). For a more detailed explanation of using this feature, please see adding and removing components.Added
worker::UpdateParameters
, which can be used to control whether ops sent withConnection::SendComponentUpdate
,Connection::SendAddComponent
, andConnection::SendRemoveComponent
will be added to the operation list of the worker from which it was sent. Setting theLoopback
parameter tokShortCircuited
enables this behaviour, setting it tokNone
disables it. By default, this value is set tokShortCircuited
.Some new constants were added to document the SpatialOS SDK version number:
worker::kApiVersionMajor
- Major version number (e.g.13
)worker::kApiVersionMinor
- Minor version number (e.g.7
)worker::kApiVersionPatch
- Patch version number (e.g.0
)worker::kApiVersion
- Version number (e.g.0x0D0700
for 13.7.0)worker::kApiVersionStr
- Version string (e.g."13.7.0"
)
In addition, there are two new functions to obtain the version number compiled into the native library itself. These can be compared to the constants above to assert that the loaded library matches the expected API version. They are:
worker::ApiVersion()
- Returns the version number.worker::ApiVersionStr()
- Returns the version number as a string.
Connection::SendComponentUpdate
now takes an optional parameter of typeUpdateParameters
. If this is omitted, theLoopback
parameter defaults tokShortCircuited
, meaning that the update will be added to the operation list of the worker from which it was sent. Setting theLoopback
parameter tokNone
disables this behaviour. This is useful if updates are applied locally before they are sent.
Worker SDK in Java
Added a new constructor to the
Locator
class in theimprobable.worker.Alpha
class which exposes the port used to connect to a locator service. This allows you to connect a worker to a local locator instance.Added methods to the
Connection
for adding and removing components on entities during runtime. You can usesendAddComponent
to add a component to an entity andsendRemoveComponent
to remove a component from an entity. In order to use these new methods, you must setConnectionParameters.enableDynamicComponents
totrue
. When this field istrue
, add and remove component ops are emitted on authority change, i.e. where you would previously receive a component update prior to gaining authority or after losing authority, you are now receiving an add component (if the component exists) or a remove component (if the component does not exist). These ops, like all add and remove component ops, must be treated in an idempotent way (i.e. they replace any existing value on the worker for the component). For a more detailed explanation of using this feature, please see adding and removing components.Added the class
UpdateParameters
, which can be used to control whether ops sent withConnection#SendComponentUpdate
,Connection#SendAddComponent
, andConnection#SendRemoveComponent
will be added to the operation list of the worker from which it was sent. Setting theLoopback
parameter toSHORT_CIRCUITED
enables this behaviour, setting it toNONE
disables it. By default, this value is set toSHORT_CIRCUITED
.Connection.SendComponentUpdate
now takes an optional parameter of typeUpdateParameters
. If this is omitted, theLoopback
parameter defaults toSHORT_CIRCUITED
, meaning that the update will be added to the operation list of the worker from which it was sent. Setting theLoopback
parameter toNONE
disables this behaviour. This is useful if updates are applied locally before they are sent.
Worker SDK in C
Added a new parameter
port
toWorker_Alpha_Locator_Create
which exposes the port used to connect to to a locator service. This allows you to connect a worker to a local locator instance.Added functions for adding and removing components on entities during runtime. You can use
Worker_Connection_SendAddComponent
to add a component to an entity andWorker_Connection_SendRemoveComponent
to remove a component from an entity. In order to use these new functions, you must setWorker_ConnectionParameters::enable_dynamic_components
to1
(true). When this field is1
, add and remove component ops are emitted on authority change, i.e. where you would previously receive a component update prior to gaining authority or after losing authority, you will now receiving an add component (if the component exists) or a remove component (if the component does not exist). These ops, like all add and remove component ops, must be treated in an idempotent way (i.e. they replace any existing value on the worker for the component). For a more detailed explanation of using this feature, please see adding and removing components.Some new constants were added to document the SpatialOS SDK version number:
WORKER_API_VERSION_MAJOR
- Major version number (e.g.13
)WORKER_API_VERSION_MINOR
- Minor version number (e.g.7
)WORKER_API_VERSION_PATCH
- Patch version number (e.g.0
)WORKER_API_VERSION
- Version number (e.g.0x0D0700
for 13.7.0)WORKER_API_VERSION_STR
- Version string (e.g."13.7.0"
)
In addition, there are two new functions to obtain the version number compiled into the native library itself. These can be compared to the constants above to assert that the loaded library matches the expected API version. They are:
Worker_ApiVersion()
- Returns the version number.Worker_ApiVersionStr()
- Returns the version number as a string.
Fixes
General
- Fixed buffer overflow when deserializing corrupt or denormalized data.
Schema
- The schema compiler now correctly enforces invalid component IDs.
- Component IDs from 190000 to 199999 are no longer reserved for Improbable use.
SpatialOS CLI tools
schema_compiler
andsnapshot_converter
now linklibstdc++
statically on Linux. This should allow these tools to be executed on certain Linux distributions that have an older version oflibstdc++
installed.
Worker SDK in C#
- Fixed an issue where a
System.Reflection.ReflectionTypeLoadException
can be thrown inImprobable.Worker.ComponentDatabase
if a loaded assembly somehow contains a type which is unable to be loaded for any reason.
Worker SDK in C
- Fixed a rare crash that could occur whilst processing loopbacked component updates if vtables are not being used.
Breaking changes
Worker SDK in C#
- In the class
PlayerIdentityTokenRequest
, the fieldDevelopmentAuthenticationTokenId
has been renamed toDevelopmentAuthenticationToken
.
Worker SDK in C++
- In the struct
PlayerIdentityTokenRequest
, the fieldDevelopmentAuthenticationTokenId
has been renamed toDevelopmentAuthenticationToken
.
Worker SDK in C
In the struct
Worker_Alpha_PlayerIdentityTokenRequest
, the fielddevelopment_authentication_token_id
has been renamed todevelopment_authentication_token
.The struct
Worker_Alpha_UpdateParameters
has been promoted to stable and renamed toWorker_UpdateParameters
.
Known issues
Worker SDK in C
- A crash can sometimes happen in a networking thread if
default_component_vtable
is assigned to a pointer whose lifetime is less than the connection future. To work around the issue, ensure that the pointer exists for longer than theWorker_ConnectionFuture*
.
13.6.2
Released on 2019-03-05
Fixes
General
- Fixed an issue where KCP applied a receive window smaller than the
RecvWindowSize
specified in KcpNetworkParameters. This could lead to poor performance for connections receiving lots of data.
Schema
- Fixed an issue in the generated JSON AST where annotations on events, commands or enum values would be added to the containing component or enum.
13.6.1
Released on 2019-02-26
Fixes
Schema
Fixed an issue where the schema compiler would give a misleading error message when importing a particular schema file a second time if errors had already been detected in that file previously.
The schema compiler now normalizes paths when verifying that input files are part of exactly one of the specified schema subtrees. As such passing
--schema_path=.\schema schema/inventory/mytype.schema
to the schema compiler on Windows, will be treated as valid.
Worker SDK in C#
- Fixed a bug which caused
System.MethodAccessException
to be thrown consistently on Windows when running a C# executable using .NET Framework.
13.6.0
Released on 2019-02-07
New features
General
- The KCP connection type, which was originally released as an
alpha stage feature in
13.4.0, is now in
beta. We’ve made the following changes and
improvements:
- We’ve moved the KCP APIs out of the alpha namespace in all language SDKs. See the updated C++ and C# API references for details.
- There are now two configurable window size parameters for both sending and receiving. This allows you to configure both flow control and memory usage in both directions.
- We’ve exposed many useful built-in metrics relating to KCP.
- We’ve changed the default KCP network parameters to give better performance in the general case.
- A detailed guide to choosing and configuring network parameters is now available, including plenty of information on how to configure KCP connections.
Fixes
General
- Fixed a potential issue where enabling protocol logging can cause a crash on Windows in specific scenarios.
Schema
- Fixed an issue where
load_all_schema_on_schema_path
would only validate schema. The argument will now generate code for any.schema
files in theschema_path
without them having to additionally be passed in as input files. You can still only validate schema by usingload_all_schema_on_schema_path
without any*_out
arguments.
Worker SDK in Java
- Fixed a crash which could occur if the PackageScanner fails to load a class due to an uncaught
ClassNotFoundException
being thrown.
13.5.1
Released on 2019-01-11
Fixes
General
Fixed an issue where the schema compiler would crash on Windows when a block comment was larger than approximately 300 characters.
Native dynamic libraries now only export the public API on macOS and Linux. This prevents clashes with other versions of dependencies (such as protobuf) included by the application, and various other issues such as double initialization of global variables in duplicated dependencies.
Schema
- Fixed an issue where annotations on fields in a component would not be added to the JSON AST.
13.5.0
Released on 2018-12-19
New features
Schema
- You can now annotate definitions in schema with instances of user-defined schema types. These
annotations are available in the JSON files generated by passing
--language=ast_json
to the schema compiler.
Worker SDK in C#
Added functions for development authentication to the
Improbable.Worker.Alpha
namespace. You can useCreateDevelopmentPlayerIdentityTokenAsync
to generate development player identity tokens with the development authentication service, andCreateDevelopmentLoginTokensAsync
to generate development login tokens with the development login service.Deprecated
Connection.IsConnected
in favour of a pair of new methods,Connection.GetConnectionStatusCode
andConnection.GetConnectionStatusDetailString
, that return an enum describing the type of failure that caused the connection to disconnect, if any, and a detail message, respectively. A corresponding enum field has also been added to theDisconnectOp
.
Worker SDK in C++
Added functions for development authentication to the alpha namespace. You can use
CreateDevelopmentPlayerIdentityTokenAsync
to generate development player identity tokens with the development authentication service, andCreateDevelopmentLoginTokensAsync
to generate development login tokens with the development login service.Deprecated
Connection::IsConnected
in favour of a pair of new methods,Connection::GetConnectionStatusCode
andConnection::GetConnectionStatusDetailString
, that return an enum describing the type of failure that caused the connection to disconnect, if any, and a detail message, respectively. A corresponding enum field has also been added to theDisconnectOp
.
Worker SDK in Java
- Deprecated
Connection.isConnected
in favour of a pair of new methods,Connection.getConnectionStatusCode
andConnection.getConnectionStatusDetailString
, that return an enum describing the type of failure that caused the connection to disconnect, if any, and a detail message, respectively. A corresponding enum field has also been added to theDisconnectOp
.
Worker SDK in C
Added functions for development authentication. You can use
Worker_Alpha_CreateDevelopmentPlayerIdentityTokenAsync
to generate development player identity tokens with the development authentication service, andWorker_Alpha_CreateDevelopmentLoginTokensAsync
to generate development login tokens with the development login service.Deprecated
Worker_Connection_IsConnected
in favour of a pair of new methods,Worker_Connection_GetConnectionStatusCode
andWorker_Connection_GetConnectionStatusDetailString
, that return an enum describing the type of failure that caused the connection to disconnect, if any, and a detail message, respectively. A corresponding enum field has also been added to theWorker_DisconnectOp
.There is now an alpha version of a new function to send component updates called
Worker_Alpha_Connection_SendComponentUpdate
. This function aims to be more flexible by allowing control of component update loopback behaviour, which is on by default.Worker_Alpha_SetAllocator
, an alpha API, is now available to set custom memory allocation functions. Note that small amounts of allocation using the system allocator can still occur.
Platform SDK in C#
Added new methods to the alpha version of the deployment service to manage player capacity and connection rate limits. See the capacity limiting scenario and the documentation on worker connection limits.
We’ve released an alpha version of the player auth service so that you can manage authentication and authorization of players connecting to SpatialOS deployments. See the documentation on creating your own authentication server using the Platform SDK, or try out the player authentication scenario.
Fixes
General
- Fixed an issue with
connection_ingress_bytes
andconnection_egress_bytes
metrics that did not take delta updates into account.
Worker SDK in C
- Compiling code which includes the
c_worker.h
header file with a C compiler no longer fails.
13.4.0
Released on 2018-11-20
New features
General
- KCP connection type
- There is now an alpha version of a new network connection type referred to as KCP. We have added this as an alternative to the existing TCP and RakNet connection types.
- The KCP connection type uses the KCP protocol as its transport reliability layer. It also uses DTLS as an encryption layer for security.
- You may want to try using KCP if you want to optimize the delivery of your network operations for latency as opposed to bandwidth usage.
- You can read about the semantics of the different KCP configuration parameters in the C++ and C# API references.
Worker SDK in Java
- We have added
EntityId.isValid
method which allows you to test the validity of an entity ID.
Worker SDK in C
- Added a missing error handling function
Schema_GetError
. This function can be used to obtain the reason whySchema_MergeFromBuffer
andSchema_SerializeBuffer
failed if they return 0.
Fixes
General
Fixed a crash on some platforms when trying to connect with the alpha locator.
Multiplex TCP connections are now established in parallel, which can drastically reduce the time to establish a connection to SpatialOS when the round trip time is high.
SpatialOS CLI tools
- Fixed an issue where the
spatial worker build
command would panic if you provided the same worker name twice.
Worker SDK in C#
- Fixed an issue where exceptions thrown inside a
Dispatcher
callback was erroneously being caught and logged byClientError.LogClientException
. Exceptions should now fully propagate to whereDispatcher.Process
was called.
Worker SDK in Java
- Fixed an issue where exceptions thrown inside a
Dispatcher
callback was erroneously being caught and logged byClientError.logClientException
. Exceptions should now fully propagate to whereDispatcher.process
was called.
Known issues
Worker SDK in C
Compiling code which includes the
c_worker.h
header file with a C compiler fails. You can work around this issue by inserting the following typedefs before you includec_worker.h
in your code:typedef struct Worker_Alpha_ErasureCodecParameters Worker_Alpha_ErasureCodecParameters; typedef struct Worker_Alpha_HeartbeatParameters Worker_Alpha_HeartbeatParameters;
13.3.1
Released on 2018-11-01
Fixes
SpatialOS CLI tools
- We have improved the performance of running several
spatial
commands when schema changes have been made in projects with a lot of schema files.
Worker SDK in C
Fixed a bug where using
Worker_ConnectionFuture_Get
returned a non-null pointer when theWorker_ConnectionFuture
was not yet completed.Fixed a bug which duplicates component data when using
Worker_SnapshotOutputStream
to write an entity that was originally read usingWorker_SnapshotInputStream
.Schema_WriteToBuffer
relied on incorrect size caching logic which is now resolved by re-calculating the size of theSchema_Object
within each call of the function. CallingSchema_WriteToBuffer
is now equivalent to callingSchema_SerializeToBuffer(object, buffer, Schema_GetWriteBufferLength(object))
.A common usage pattern:
uint8_t* buffer = new uint8_t[Schema_GetWriteBufferLength(object)]; Schema_WriteToBuffer(object, buffer);
should be replaced with:
uint32_t length = Schema_GetWriteBufferLength(object); uint8_t* buffer = new uint8_t[length]; Schema_SerializeToBuffer(object, buffer, length);
Deprecations
Worker SDK in C
uint8_t Schema_WriteToBuffer(Schema_Object object, uint8_t* buffer)
is deprecated in favor ofuint8_t Schema_SerializeToBuffer(const Schema_Object* object, uint8_t* buffer, uint32_t length)
.A common usage pattern:
uint8_t* buffer = new uint8_t[Schema_GetWriteBufferLength(object)]; Schema_WriteToBuffer(object, buffer);
should be replaced with:
uint32_t length = Schema_GetWriteBufferLength(object); uint8_t* buffer = new uint8_t[length]; Schema_SerializeToBuffer(object, buffer, length);
13.3.0
Released on 2018-09-28
New features
General
- A new parameter is available and exposed through all the SDKs:
DefaultCommandTimeoutMillis
. This parameter sets a default timeout for commands without an explicitly set timeout argument.
Worker SDK in C#
- Added a new Locator class to the
Improbable.Worker.Alpha
namespace. You can use this to log in with the new Locator flow using a login token and player identity token, which you can obtain from a game authentication server.
Worker SDK in C++
- Added a new Locator class to the alpha namespace. You can use this to log in with the new Locator flow using a login token and player identity token, which you can obtain from a game authentication server.
Worker SDK in Java
- Added a new version of the Locator, called
Alpha.Locator
. You can use this to log in with the new locator flow using a login token and player identity token, which you can obtain from a game authentication server.
Platform SDK in C#
- Added alpha version of
ServiceAccountServiceClient
so that you can manage accounts used for automated services that interact with SpatialOS.
Fixes
Worker SDK in C#
Fixed a bug which may cause a crash if a
Future
, returned byLocator.GetDeploymentListAsync
orLocator.ConnectAsync
, is resolved after its correspondingLocator
object is destroyed.We now throw exceptions when invalid arguments are passed to API methods.
When sending commands, maps and lists set to
null
in schema-generated code are now treated as empty maps and empty lists respectively.When sending updates, if the
map
orlist
properties of a component are set tonull
, they will throw an exception. With a breaking change included in 14.0, it will not be possible to create anOption
of a reference type with anull
value.
Worker SDK in C++
Added missing default initializers to structs holding parameters such as
LocatorParameters
andThreadAffinityParameters
. Previously, it was easy to end up with garbage data in fields that weren’t explicitly assigned to, depending on exactly how the struct was declared.Fixed a bug which may cause a crash if a
worker::Future
, returned byworker::Locator::GetDeploymentListAsync
orworker::Locator::ConnectAsync
, is resolved after its correspondingworker::Locator
object is destroyed.
Worker SDK in Java
Fixed a bug which may cause a crash if a
Future
, returned byLocator.getDeploymentListAsync
orLocator.connectAsync
, is resolved after its correspondingLocator
object is destroyed.Fixed a number of issues which was causing a vastly increased amount of GC pressure. This fix significantly improves the performance of Java workers, making them more on par with C# and C++.
We now throw exceptions when invalid arguments are passed to API methods.
When sending commands:
- maps and lists set to
null
in schema-generated code are initialized as empty maps and empty lists respectively. EntityId
set tonull
in schema-generated code is initialized withid 0
.Bytes
set tonull
in schema-generated code is initialized with empty backing array.- reference types set to
null
in schema-generated code are initialized to the default value of their corresponding primitive type. - user-defined types set to
null
in schema-generated code are initialized following the rules stated above.
- maps and lists set to
Worker SDK in C
Fixed a bug which may cause a crash if a
Worker_DeploymentListFuture
orWorker_ConnectionFuture
, returned by theWorker_Locator_GetDeploymentListAsync
andWorker_Locator_ConnectAsync
methods respectively, is resolved after its correspondingWorker_Locator
object is destroyed.Fixed a linker error when using
Schema_GetCommandResponseComponentId
.
Breaking changes
Worker SDK in C++
- Using list initialization for the
LocatorParameters
struct no longer works in C++11. If you get a compile error, assign to the fields by name instead. Later versions of C++ are unaffected.
13.2.0
Released on 2018-08-15
New features
General
Thread affinity
- Thread affinity parameters let you specify which set of logical cores, the threads started by SpatialOS will run on.
- This is our first feature focused primarily towards console support, and we are currently formalising the authentication process for access to console development.
- For more information, see the thread affinity docs.
Added new built-in metrics to all SDKs, extracted from RakNet reporting. They will be populated only when using RakNet as a transport layer.
The following new metrics have been added:
- raknet_receive_buffer_size
- raknet_send_buffer_size
- raknet_send_buffer_size_bytes
- raknet_resend_buffer_size
- raknet_resend_buffer_size_bytes
- raknet_packet_loss_last_second
- raknet_packet_loss_lifetime
- raknet_last_ping_seconds
SpatialOS CLI tools
- Added the
spatial service
CLI commands to enable local API usage with the Platform SDK.
Platform SDK in C#
- First release of the Platform SDK in C#.
Fixes
Worker SDK in C
Fixed potential race conditions in the destruction of
Worker_ConnectionFuture
,Worker_SnapshotInputStream
andWorker_SnapshotOutputStream
.Worker_AcquireComponentData
,Worker_ReleaseComponentData
and related functions are now exported from the DLL correctly when using the dynamic build on Windows.
13.1.1
Released on 2018-07-19
New features
General
- On Windows, we now ship debug symbols for packages which contain DLLs (currently, just
CoreSdkDll.dll
). Usually, these aren’t needed for development, but can be useful to debug crashes which originate from native code when loading the DLL. The static libraries shipped with the Worker SDK in C++ should also now include debug symbols by default.- You can find a
.pdb
file compatible with theCoreSdkDll.dll
in thecore-dynamic-dbgsym-x86_64-win32
worker package. To extract this to a folder calleddebug_symbols
, runspatial package unpack-to worker_sdk core-dynamic-dbgsym-x86_64-win32 debug_symbols
.
- You can find a
Fixes
General
Fixed a crash which can occur when calling
GetOpList
on a failed connection after the metrics report period has elapsed.Fixed a minor memory leak when calling
GetOpList
on aConnection
across C++, C#, Java, and C APIs.Fixed an issue which caused
sfixed64
fields to be received incorrectly when set to certain values.Fixed two memory leaks.
Fixed two potential race conditions.
Removed often misleading debug log for
Received incoming command response for unknown request ID
.
Worker SDK in C#
- Fixed an issue which was causing a small chunk of memory to be needlessly heap allocated every time a component update, a command request or command response was being sent.
Worker SDK in C++
- The
cpp-static-x86_64-gcc_libstdcpp_pic-linux
package now includesworker_protocol.h
as it should, fixing the compilation error that occurs when using this package.
Worker SDK in C
Fixed a potential race condition in the destruction of the
Connection
.Fixed an issue which caused
user_handle
to sometimes be uninitialised rather than set toNULL
if no vtable functions are provided.
13.1.0
Released on 2018-07-02
New features
General
Delta-compressed component updates
- We’ve built an alpha version of a feature to optimise bandwidth usage for large component updates: delta-compressed component updates.
- This feature is still in the very early stages. If you want to try it out, we recommend reading the documentation fully and in detail. In particular, if you aren’t careful about which components you delta compress, it can crash your deployment, because - used badly - it can overload the Runtime.
- Because of this, please don’t use this feature in cloud deployments. If you use it in a cloud deployment, we reserve the right to shut your deployment down.
- If you want to try it out, see the docs on delta-compressed component updates.
A new parameter is available and exposed through all the SDKs:
ConnectionTimeoutMillis
. The parameter sets an upper bound on the time (in milliseconds) the futures returned by theConnectAsync
methods inLocator
andConnection
will take to complete. If the attempt is unsuccessful by that point, the connection attempt will be stopped.Added extra logging to protocol logs about connection establishment.
Added option to turn on logging for the locator connection (for example, when listing deployments).
Added new built-in metrics to all SDKs for local command timeouts, and unexpected command responses. These augment the previously misleading “Received incoming command response for unknown request ID XX” warning logs.
The following new metrics have been added:
- connection_local_command_timeouts
- connection_local_command_timeouts_rate
- connection_unexpected_command_response_receives
- connection_unexpected_command_response_receives_rate
Added new built-in metrics to all SDKs for monitoring delta-compression.
JSON files generated by passing
--language=ast_json
to the schema compiler now contain command and event indices.New built-in metrics have been added to all SDKs for monitoring egress and ingress bytes on the network. The full list is available in the documentation.
New built-in metrics have been added to all SDKs for monitoring the receive rate of Ops in the dispatcher. The full list is available in the documentation.
The following built-in worker metrics have been renamed in all SDKs:
Bridge Send Queue
->connection_send_queue_size
Bridge Receive Queue
->connection_receive_queue_size
OpList Receive Queue
->connection_oplist_queue_size
Bridge Send Queue Fill Rate
->connection_send_queue_fill_rate
Bridge Receive Queue Fill Rate
->connection_receive_queue_fill_rate
OpList Receive Queue Fill Rate
->connection_oplist_queue_fill_rate
New built-in metrics have been added to all SDKs for monitoring Connection Send API call rates. The full list is available in the documentation.
Workers now automatically explicitly fail unknown commands, or commands they fail to deserialize due to data corruption, malicious sender, or out of date schema, instead of silently timing out. The worker issuing the command will observe an INTERNAL error with a suitable error message.
Worker SDK in C++
- Added an overload of
worker::Connection::SendAuthorityLossImminentAcknowledgement
taking a component metaclass as a template parameter rather than an explicit component ID.
Worker SDK in Java
- Added an overload of
improbable.worker.Connection.sendAuthorityLossImminentAcknowledgement
taking a component metaclass parameter rather than an explicit component ID.
Worker SDK in C
We’ve introduced an alpha API for building workers in C.
This is much lower-level than the C#, C++ and Worker SDK in Javas: unlike those SDKs, it doesn’t provide any code generated from schema. Instead, it exposes serialization functions to directly read and write component data, component updates, and command requests and responses.
The Worker SDK in C enables far more flexibility than our standard SDKs, and lets you work with dynamic languages such as Python and Lua. However, it takes substantially more work to get started as you need to implement your own code generation and serialization.
If you want to try it out, see the docs for the Worker SDK in C.
Fixes
General
Fixed an infrequent issue where a worker couldn’t connect to SpatialOS using RakNet on some machines.
Fixed an issue where setting
BuiltInMetricsReportMillis
to 0 would result in a reporting period of 5000 milliseconds, rather than no reporting.
Known issues
Worker SDK in C
Worker_AcquireComponentData
,Worker_ReleaseComponentData
and related functions won’t link correctly on Windows when using the dynamic build, because they aren’t marked as exported.
13.0.1
Released on 2018-06-04
New features
SpatialOS CLI tools
- You can now force the non-interactive mode by passing the
--no_animation
flag to anyspatial
CLI command. This disables colours and animation. - You can now use the
--json_output
flag to switch the CLI output to be in JSON format.
Fixes
SpatialOS CLI tools
Fixed an issue where SpatialOS CLI would not output any warnings or error details when running
spatial worker build
.The
spatial
CLI documentation is now up-to-date.The CLI now uses progress bars and task groups more consistently throughout all the commands.
We’ve improved the non-interactive mode detection, and the CLI now automatically detects when it should disable colours and animation.
When running commands from within a SpatialOS project, all the commands (rather than a subset) now output to the log files.
Worker SDK in C#
- We’ve optimised the internals of sending and receiving component updates! It’s now quicker and causes less garbage collection churn.
Worker SDK in C++
- The Worker SDK in C++ is now a header-only library. It’s no longer necessary to link against
libWorkerSdk.a
(on MacOS and Linux) orWorkerSdk.lib
(on Windows), and these libraries will be removed in the future. Note that you still need to link against theCoreSdk
library and its dependencies (libCoreSdk.a
orCoreSdk.lib
).
13.0.0
Released on 2018-05-10
General
The only change in SpatialOS 13.0 is that SpatialOS no longer includes the Unity and Unreal SDKs. The Unity and Unreal SDKs are now released separately and hosted on GitHub.
If you’re using the Unity or Unreal SDK, to migrate to the GitHub-hosted SDK, visit the repository on GitHub:
To find out more about why we’ve made this change, read this blog post.
If you’re not using the Unity or Unreal SDK, upgrade to 13.0 by following the upgrade guide.