Get SpatialOS

Sites

Menu

Release notes for SpatialOS version 12

Note: SpatialOS 12 is fine for local development and deployments using the small deployment template, but deployments using larger templates may be unstable.

12.0.5

Released on 2017-11-24

New features

C++ SDK

  • We now provide a version of the C++ worker SDK compiled as position independent code (i.e. with -fPIC). It is available as a worker package called cpp-static-x86_64-gcc_libstdcpp_pic-linux.

Fixes

Unity SDK

  • Removed a warning about ‘Assets/Resources/EntityPrefabs’ folder not being present during Unity build, as it is not always necessary. Moreover, an empty folder does not get automatically created anymore.

Unreal SDK

  • Component commands no longer fail if the component receives a new command before it has sent the response to the previous command.

  • Fixed a problem where accessing a request associated with a command responder after a delay could result in a crash.

  • Fixed some header files not having a set of self-contained #includes.

  • If your game project has any files that need Engine.h to be included, you must include this header file in your project code directly.

  • When generating code for schema files, you’ll no longer get the error “Trying to get DefaultInitialisationString” if you mention a type before initialising it, for example:

      type SomeType {
        EntityId entity = 1;
        uint32 value = 2;
      }
          
      type TestComponentCustomData {
        SomeOtherType my_member_for_component = 1;
      }
          
      type SomeOtherType {
        SomeType my_member_within_some_other_type = 1;
      }
          
      component TestComponent {
        id = 100000;
        data TestComponentCustomData;
      }
    

Known Issues

Unity SDK

  • The UseExternalIp settings parameter (default is true) assumes the opposite value of what is specified via the command line argument +useExternalIpForBridge, e.g. starting a worker with +useExternalIpForBridge true results in UseExternalBridge being set to false. For more information about the UseExternalIp parameter, please see the API reference.

Unreal SDK

  • The following built-in schema types improbable.Coordinates, improbable.Vector3d, improbable.Vector3f may not be used as return types for schema defined component commands, e.g. command improbable.Coordinates my_command(MyType); or as payload types for schema defined component events, e.g. event improbable.Coordinates my_event;. As a temporary work-around, please wrap improbable.Coordinates, improbable.Vector3d, improbable.Vector3f in a user defined schema type and use that type in your command/event definition instead, e.g. type MyType { improbable.Coordinates = 1; }.
  • When running a cloud deployment, clients may not be able to connect to your game due to a bug in the Unreal source code. To fix this, please patch this pull request into your Unreal Engine source code and rebuild Unreal. Afterwards, you need to build your project using spatial build.

12.0.4

Released on 2017-10-31

Fixes

Spatial CLI tools

  • No longer generating BOM (Byte order mark) at the start of the files created by spatial codegen

Unity SDK

  • Made spatial diagnose output much easier to read and understand.
  • The Unity SDK will now properly apply native platform settings to the CoreSdk plugin.

Unreal SDK

  • Fixed a crash after disconnecting from SpatialOS.
  • Fixed potential crash when destroying a USpatialOSComponent.

C++ SDK

  • Fixed an issue where some channels of a TCP connection could timeout if unused when connecting with UseExternalIp set to true.

12.0.3

Released on 2017-10-23

New features

Unreal SDK

  • Added FRequestId as the return value of every command. This can be used to link up and trace the sent request.
  • Added RequestId field in the entity query result. This RequestId is the same as FRequestId returned from the sent request.

    Note: Because of these changes, you might need to regenerate the entry points of your command callbacks blueprints.

Fixes

Spatial CLI tools

  • Fixed a formatting issue where the string (MISSING!) could show up in the terminal output when building Unity workers.

  • Fixed a problem with spatial diagnose and spatial setup install-dependencies where newer versions of the Visual Studio 2015 redistributable would be considered unsupported.

  • Fixed an occasional issue where spatial worker build produced a .zip file that the Launcher could not unzip.

Unity SDK

  • Fixed a MissingMethodException when using SpatialOS Unity SDK with Unity 2017.1 and 2017.2 releases.

Unreal SDK

  • Fixed Unreal worker examples outputting their logs to the wrong place. Please update the command line arguments specified in the “managed” and “external” sections of spatialos.Unreal<Client/Worker>.worker.json:

    • Remove any usages of "-SaveToUserDir".
    • Change any usages "log=<SomeLogFile.log>" to "-abslog=${IMPROBABLE_LOG_FILE}", OR, if there is no log parameter, add a new "-abslog=${IMPROBABLE_LOG_FILE}" parameter to the end of the parameter list.
  • Previously, there was an issue where you couldn’t call SpatialOS.Connect() more than once per worker session (for example, after a failed attempt to connect or after a successful disconnect). This has now been fixed.

  • You can now generate commands with the same delegate type (request type and response type) properly.

  • SpatialOS.OnDisconnectedDelegate is now invoked properly when a connection to SpatialOS is lost or when SpatialOS.Disconnect() is called.

  • SpatialOS.OnConnectionFailedDelegate is now invoked properly when SpatialOS.Connect() failed to establish a connection.

C# SDK

  • RakNet connections now report the “Bridge Send Queue Fill Rate” metric correctly.

C++ SDK

  • RakNet connections now report the “Bridge Send Queue Fill Rate” metric correctly.

Java SDK

  • RakNet connections now report the “Bridge Send Queue Fill Rate” metric correctly.

12.0.1

Released on 2017-10-05

Fixes

C# SDK

  • Calling DeepCopy on a generated type containing a collection of EntityId or Bytes values will now function correctly rather than throwing an exception.

12.0.0

Released on 2017-10-03

New features

General

  • A new load balancer strategy is now available. The new “Points of Interest” strategy is a static load balancing strategy which allows you to specify points of interest in your world and a targeted number of workers. The strategy will then determine the best way to simulate those points of interest so that each point is only simulated by a single worker. For more information read our load balancer configuration page.

  • The authority handover between two workers has been reworked. It is now possible for workers to be warned of imminent authority loss before they actually lose authority over a component. More information can be found in Handing over authority between workers.

Schema

  • Maps now support non-primitive types as keys.
  • Transient fields in Schemalang.

    In Schemalang, you can now mark option, list and map fields as transient. Data in transient fields won’t be saved in snapshots taken from a deployment, or loaded from a snapshot at the start of deployment.

    This makes clearing per-deployment state in snapshots easier. See the Schemalang Reference for more information.

Unreal SDK

  • SpatialOS component properties are now publicly exposed, and will automatically replicate when modified. This is more efficient than manually sending component updates. See the upgrade guide to get started, and Interacting with entity components for more information.

C# SDK

  • Added Improbable.Worker.SnapshotInputStream and Improbable.Worker.SnapshotOutputStream to read and write snapshot files one entity at a time. Improbable.Worker.Snapshot.Load and Improbable.Worker.Snapshot.Save have been deprecated.

  • Added a ToString() method to the Option class which returns the string "Option[Value]", or "Option.EMPTY" if Option has no value.

  • Added the IDeepCopyable interface in the Improbable.Collections namespace. This enables deep copying of classes which implement the IDeepCopyable interface.

  • C# Classes in the Improbable.Collections namespace now implement the IDeepCopyable interface.

  • The HasAuthority boolean on the AuthorityChangeOp has been removed and replaced with Authority enum with values NotAuthoritative, Authoritative, AuthorityLossImminent.

  • The HasAuthority method on the View has been removed and replaced with GetAuthority which returns an enum.

  • Connection.SendLogMessage() now accepts an optional entity ID to associate with the log message.

  • Connection.SendReserveEntityIdsRequest and Dispatcher.OnReserveEntityIdsResponse methods have been added, enabling single requests to reserve contiguous ranges of entity IDs to be used for entity creation.

  • query::NotConstraint has been added to allow queries to match entities that do not match the given subconstraint.

C++ SDK

  • Added worker::SnapshotInputStream and worker::SnapshotOutputStream to read and write snapshot files one entity at a time. worker::LoadSnapshot and worker::SaveSnapshot have been deprecated.

  • Schema-generated types are now default-constructible. This is equivalent to calling the existing static Create() method.

  • The C++ SDK now has the equivalent of the Worker.Dynamic functionality from the C# and Java SDKs, in the form of two new functions worker::ForEachComponent and worker::ForComponent. These are template functions which take a worker::Components template class parameter to define the list of components that should be considered.

  • The HasAuthority boolean on the AuthorityChangeOp has been removed and replaced with Authority enum with values kNotAuthoritative, kAuthoritative, kAuthorityLossImminent.

  • The HasAuthority method on the View has been removed and replaced with GetAuthority which returns an enum.

  • Connection.SendLogMessage() now accepts an optional entity ID to associate with the log message.

  • Connection::SendReserveEntityIdsRequest and Dispatcher::OnReserveEntityIdsResponse methods have been added, enabling single requests to reserve contiguous ranges of entity IDs to be used for entity creation.

  • query::NotConstraint has been added to allow queries to match entities that do not match the given subconstraint.

Java SDK

  • Added improbable.worker.SnapshotInputStream and improbable.worker.SnapshotOutputStream to read and write snapshot files one entity at a time. improbable.worker.Snapshot.load and improbable.worker.Snapshot.save have been deprecated.

  • The HasAuthority boolean on the AuthorityChangeOp has been removed and replaced with Authority enum with values NotAuthoritative, Authoritative, AuthorityLossImminent.

  • The HasAuthority method on the View has been removed and replaced with GetAuthority which returns an enum.

  • Connection.SendReserveEntityIdsRequest and Dispatcher.OnReserveEntityIdsResponse methods have been added, enabling single requests to reserve contiguous ranges of entity IDs to be used for entity creation.

  • Connection.sendLogMessage() now accepts an optional entity ID to associate with the log message.

  • query::NotConstraint has been added to allow queries to match entities that do not match the given subconstraint.

Fixes

Spatial CLI tools

  • Improved user experience when using spatial setup install-dependencies. The Unity SDK won’t be installed by default any more. See the SpatialOS Windows setup guide for more details.

Unity SDK

  • Fixed MacOS workers throwing exceptions like Failed to deserialize snapshot for component ID 50 when built with Unity 2017.1.
  • Prefab pools are now cleaned and removed from scenes after disconnecting from SpatialOS.

  • The Unity SDK and all generated code is now placed under the <unity worker>/Assets/Plugins/Improbable folder to help decrease project compile times. It was previously installed to <unity worker>/Assets/Improbable.

  • When you’re using EntityBuilder, you can now set write access on the EntityACL component itself using .SetEntityAclComponentWriteAccess(). For details, see, Creating and deleting entities

Unreal SDK

  • Cleaned up auto-generated component code. Unused functions are removed and formatting is improved.
  • Fixed a C++ compile error that could occur when custom types were declared and referenced in different orders.

  • Fixed an issue where a component’s OnPropertyUpdate delegates were invoked before the entire component update was applied.

  • The errors useradd: user 'unrealworker' already exists and ln: failed to create symbolic link '/improbable/logs/UnrealWorker/Logs/Epic': File exists will not appear anymore when running a cloud deployment with more than one Unreal worker.

  • When you’re using EntityBuilder, you can now set write access on the EntityACL component itself using .SetEntityAclComponentWriteAccess(). For details, see Creating and deleting entities

  • spatial worker clean now properly cleans up intermediate code-generated files.

C# SDK

  • A Dispatcher callback that itself registers multiple other callbacks on the same Dispatcher no longer possibly results in those callbacks being registered in the wrong order.
  • Fixed an issue where invoking Dispatcher callbacks could allocate memory on old versions of .NET (including Unity).

C++ SDK

  • A Dispatcher callback that itself registers multiple other callbacks on the same Dispatcher no longer possibly results in those callbacks being registered in the wrong order.

Java SDK

  • A Dispatcher callback that itself registers multiple other callbacks on the same Dispatcher no longer possibly results in those callbacks being registered in the wrong order.

  • Java objects which implement Closeable now throw a RuntimeException if they are used after the close() method is called.

Breaking changes

General

  • All usages of the darwin and mac strings for target-platform specifications have been deprecated in favour of macos. For information about how to get your project up-to-date please see the upgrade-guide.

Unity SDK

  • Command-line arguments +ip and +port used by Unity workers have been renamed to respectively +receptionistHost and +receptionistPort.

  • CoreSdkDll worker SDK libraries have been moved from Assets/Plugins/x86 <or> x86_64 <or> core-bundle-x86_64-macos to Assets/Plugins/CoreSdk. Please make sure you remove the folders previously containing CoreSdkDll when upgrading your project.

Unreal SDK

  • All component update delegates have been changed to a global FSpatialComponentUpdated delegate with zero parameters. With the seamless update implementation, you can now read the property value directly from the component.
  • Command-line arguments +ip and +port used by Unreal workers have been renamed to respectively +receptionistHost and +receptionistPort.

  • Component command delegate types are now declared in the global namespace in order to work around a UE4 limitation. Command delegates use their return and input types as naming for the delegate, for example command DamageResponse damage(DamageRequest); will create a delegate named FDamageResponseDamageRequestCommand and will be declared in the command responder .h file, in this case DamageCommandResponder.h.

  • Component event delegate types are now declared in the global namespace in order to work around a UE4 limitation. Event delegates use their return type as naming for the delegate, for example event TestEvent toggled; will create a delegate named FTestEventDelegate and will be declared in the user type .h file, in this case TestEvent.h.

  • Component updates on Coordinates properties are now automatically transformed into Unreal coordinate space. Calling SpatialOsCoordinatesToUnrealCoordinates() is no longer necessary when applying a position update to an Unreal actor.

  • Delegates declared in SpatialOSComponent.h have been moved to global scope and renamed. FAuthorityChangeDelegate is now named FSpatialAuthorityChangeDelegate and FComponentReadyDelegate is now FSpatialComponentReadyDelegate.

  • Unreal SDK now requires an explicit list of components to be passed into certain methods in the underlying C++ SDK. The complete list of methods which now require this parameter is:

    • Connection::ConnectAsync
    • Locator::ConnectAsync
    • Dispatcher::Dispatcher
    • LoadSnapshot
    • SaveSnapshot
  • “SpatialOSCommon.h” provides an autogenerated helper type called improbable::unreal::Components to pass as a template parameter into these functions. Note that it is uncommon to be using these low level functions in Unreal code.

C# SDK

  • Finding out which components the worker is authoritative over has moved from Improbable.Worker.Entity (entity.HasAuthority, which has been removed) into the Improbable.Worker.View itself (view.GetAuthority).
  • The GetComponents method on the Improbable.Worker.Entity class has been renamed to GetComponentIds, and now returns a HashSet<uint>.
  • The Contains method on the Improbable.Worker.Entity class has been removed. Use Get<T>().HasValue instead.

  • The old --language=csharp_deprecated codegen backend for spatial process_schema has been removed.

  • The C# SDK no longer depends on protobuf-net, and protobuf-net is no longer distributed with the SDK. If you have customised project files for your C# workers, you will need to update them to remove this dependency.

C++ SDK

  • Finding out which components the worker is authoritative over has moved from worker::Entity (entity.HasAuthority, which has been removed) into the worker::View itself (view.GetAuthority).

  • The way the C++ SDK finds out about components in generated code has changed. The old mechanism attempted to discover components automatically using static initialization tricks, but this did not work correctly in many situations. SDK methods now require an explicit list of components to be passed in using the worker::ComponentRegistry interface, which is implemented by the worker::Components template class. The complete list of methods which now require this parameter is:

    • Connection::ConnectAsync
    • Locator::ConnectAsync
    • Dispatcher::Dispatcher
    • LoadSnapshot
    • SaveSnapshot
  • The worker::View class has moved to a separate header file, <improbable/view.h>. This class can now be implemented entirely in user code using the new ForEachComponent functionality, and is intended to serve mostly as an example. The View::View constructor now takes a worker::Components template class argument.

Java SDK

  • A number of class fields have been changed to make the Java SDK more consistent with other language SDKs:
    • networkParameters in ConnectionParameters is now network
    • type in NetworkParameters is now connectionType

Deprecations

Unity SDK

  • Field PlayerBuildConfiguation.Global, class GlobalConfig and class PluginConfig (in Improbable.Unity.EditorTools.Build) are deprecated.
  • The HasAuthority boolean on SpatialOS Components have been deprecated, and replaced with Authority enum with values NotAuthoritative, Authoritative, AuthorityLossImminent.
  • The HasAuthority method on the View has been deprecated, and replaced with GetAuthority which returns an enum.

Unreal SDK

  • The HasAuthority boolean on SpatialOS Components have been deprecated, and replaced with EAuthority enum with values NotAuthoritative, Authoritative, AuthorityLossImminent.

JavaScript SDK

  • The Experimental JavaScript SDK is now deprecated. As part of its “experimental” status we have done a thorough evaluation of the Javascript SDK through its usage, features and maintenance cost. As a result the decision was taken to halt its development. Please contact us if you have any queries.

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums