Appearance
Appearance
Metaplay.Generated.dll
for game builds no longer interferes with editor operation and therefore a failing or aborted game build leaving this temporary file in the filesystem is no longer an issue.npm ci
to fetch the new (audited) dependencies before running the project locally.WireProtocol
has been bumped up to version 10, to eliminate legacy project-specific differences in the low-level protocol. To facilitate a smooth game update release 17 introduced client-side forwards compatibility to version 10, so as long as released clients are based on Metaplay R17 this change is transparent. LogicVersion
and update the game client and server synchronously.[EntityConfig]
attribute on a SomeEntityConfig
class. See below for details. vue-cli
and webpack
to vite
and rollup
. This is a major refactoring that got us much faster development server speeds, fewer dependencies, simpler configuration, and TypeScript support.vuex
-based state handling is now complete and all references to the deprecated globalState
object have been removed. This gives us access to the great debugging tools from the Vuex team.EntityArchive
format used for exporting and importing entity states now supports communicating the schema version of the entity and importing an entity of an older schema version will automatically trigger migration code to be run on import. This can be used to import entity states across environments that are running different schema versions, for example importing a player from production to a development environment where the schema has been updated. Span<>
optimizations are used to avoid memory allocations during serialization on the client.FromXyz()
methods to avoid accidental implicit casting.GetHashCode()
s to XOR the integer and fraction parts (instead of bitwise ORing the high and low parts).Pow(x, 0)
now always returns 1 for any values of x.SqrtPrecise()
now returns 0 for invalid values (previously returned -1).Ratio10()
, Ratio1000()
, Div2()
, Sign()
, ..OrderedDictionary<>
due to GetHashCode()
generating conflicts for integer values.[EntityConfig]
attribute and system consolidates the configuration of entities in the server: which actors should back the entities, how to shard them in the cluster, and so on. This replaces the old configuration in ServerMain.cs
and the old [EphemeralEntityActor(..)]
and [PersistedEntityActor(..)]
. There is no proper documentation for this yet as further work will be done in the area, but take a look at the SDK actors for usage examples.Assets/SharedCode/
. The directory can be changed from the Directory.Build.props
and given as an argument to docker builds.$type
property to make adding new generated views easier and more consistent.OfflineOptions = new MetaplayOfflineOptions { PersistState = true, SupportedSchemaVersions = MetaVersionRange(1, 1) }
in MetaplayClientOptions
to MetaplayClient.Initialize()
, or in MetaplaySDKConfig
to MetaplaySDK.Start()
. Check out Idler for an example.GameConfigTool
that can be used to build, print, and publish (to localhost only for now) Game Configs with a command-line app. This can be useful for, eg, easier debugging of Game Config builds within Visual Studio. If you wish to try out the tool, you’ll need to apply your project-specific secrets, sheet ids, etc. in GameConfigTool.cs
.IntegrationRegistry
system for discovering game-specific overrides for SDK API classes related to in-game mails and game configs. Over time this system will be adopted to cover further integration APIs. The system reduces the need for custom hooks for introducing game integration classes.Infrastructure and Helm chart compatibilities for this release:
infra-modules
version 0.1.6 or later for infrastructuremetaplay-gameserver
Helm chart version 0.3.1 or later for deploymentinfra-modules
version 0.2.0 or later for infrastructuremetaplay-gameserver
Helm chart version 0.3.2 or later for deploymentmeta-language-label
component to display language labels.meta-input-number
and meta-input-checkbox
components as we start to migrate away from Bootstrap components.EntityActorRegisterCallback
method attribute for EntityActor classes to receive EntityActor metadata as part of the EntityActorRegistry initialization.EntityActor.ScheduleExecuteOnActorContext
helper for cancellable, short-term actor-local scheduling needs.DbSet<>
s are declared for all PersistedEntityActor
s at application launch time instead of upon first use.PersistedMultiplayerEntityActorBase
, MultiplayerModelBase
, and MultiplayerEntityClientBase
provide base code for server-side ticking entities, and for their Model and the client side state management.metaplay_build_info
metric that contains build number and commit id.GameConfigLibrary<TKey, TInfo>
key type to implement IEquatable<TKey>
to avoid potential performance pitfalls.[MetaSerializable]
types that have no serializable (i.e. [MetaMember()]
) fields as they are most likely an error.DatabaseShardState
as obsolete.MetaDatabase.GetTableItemCountsAsync()
for querying exact counts (can take time) and MetaDatabase.EstimateTableItemCountsAsync()
for quickly getting estimates.[EphemeralEntityActor]
and [PersistedEntityActor]
attributes with a more general [EntityConfig]
attribute and classes for specifying how the EntityKinds should behave on the server.LogicVersionRange
to MetaVersionRange
. Use it for specifying PersistedEntityConfig.SupportedSchemaVersions
.EntityEventLog
by entity type into EventLogForPlayer
and EventLogForGuild
. This reduces nesting in the options, allowing them to better benefit from validation as well as the new [MetaDescription]
s for options.IOBuffer
s is simplified which improves serialization performance by 10-15% in microbenchmarks.vue-cli
to Vite
.utils.js
refactored to named exports in individual files to make individual named imports and thus, tree shaking, possible.this.$root.state
is no more!Metaplay.Generated.dll
no longer needs to be manually deleted after a game build. The file has been moved from under Assets/Metaplay
to Assets
and is automatically cleaned up on a successful build. A failed or aborted build will result in the file not being deleted but the existence of it no longer interferes with Editor operation.Span<>
in Unity 2021.2 and above for various serializer code paths, reducing the number of allocations during (de)serialization.GameConfigLibrary<>
key type is missing either ToString()
or Equals()
.IComparable<>
now also implement untyped IComparable
.purchaseState
= 0). In particular, don't accept Google Play's "deferred" purchases until they are completed.IAPManager
utility now ignores purchases in the "deferred" state (purchaseState
= 4).EnableTLS
but will use the value from the primary configuration.