Appearance
Appearance
Changes in client code that don't affect the shared logic between client and server can be deployed as new client releases without needing to deploy a new server. Incremental client updates like this should not modify the current logic version of the client, since the shared logic has not changed. It may, however, be useful to be able to distinguish between different client releases for the purposes of forcing clients to update to a more recent version. The Metaplay SDK provides the concept of Client Patch Version for this purpose.
The Client Patch Version is simply a running number that represents the current index of the client release for a given logic version. The client communicates this value as part of the connection handshake and the server controls whether a particular Client Patch Version is allowed to connect by comparing it against the minimum required Client Patch Version that is configured on the LiveOps Dashboard.
The Client Patch Version is specified in the game-specific MetaplayCoreOptions
implementation as the clientPatchVersion
parameter.
public MetaplayCoreOptions Options => new MetaplayCoreOptions(
...
// Specify client version (only support version 4)
clientLogicVersion: 4,
// Specify the current client patch version for logic version 4
clientPatchVersion: 5
...
);
Note that the Patch Version always refers to a given clientLogicVersion
, so whenever you bump the logic version to develop the next game update you should reset the value to 0.
A client hotfix is typically built from a branch in source control representing the corresponding full release, identified by the active Logic Version
configured in the file of your project that populates MetaplayCoreOptions
. A client hotfix release must not change clientLogicVersion
, but rather increment the clientPatchVersion
member by one as demonstrated above. Additionally, you must take care that the client hotfix release indeed doesn't contain changes in the shared logic that would make it incompatible with the deployed server.
When multiple client platforms are supported, the need for a hotfix may exist for all platforms or only a subset of the supported platforms. Regardless of whether you intend to release the hotfix for only one platform or many, you should bump the global clientPatchVersion
in your release branch by one and separately keep track of which client patch versions have been released for each platform. The record of release client hotfixes might look like this, for example:
In this example, after the initial patch version 0 we have released the following Client Patch Versions:
By default, the game server allows connections from clients of a supported logic version regardless of the patch version. The current state of client compatibilty requirements can be seen on the Common Settings tab of the Settings page on the LiveOps Dashboard:
You can force clients of older patch versions to update by adding a patch version rule in the Edit Settings dialog. In this example we are enforcing that for the active logic version 4 we require iOS clients to be at least on patch version 4 and Android clients to be at least on patch version 1.