Game Instance SDK and Events #
Game Instance Service SDK Methods #
The SDK includes methods for Game Instance service implementation through the
MatchApi classes, depending on whether the call comes from the game client or game server, respectively. The tables below contains a list of all the
MatchApi methods relevant to the Game Instance service.
GameLoopAPI (player client) SDK methods #
|Confirms the connection details and game instance |
|Signals a game instance is ready to start.|
|Signals a game instance has completed.|
|Processes player game results for a subset of players within a game instance. Does not end the game instance.|
|Allows an active game instance to enter matchmaking to accept additional parties.|
|Removes an active game instance from matchmaking.|
|Uses player connection token to verify that connecting players are not misrepresenting their Pragma identity.|
|Ensures a game instance does not get ended by the Game Instance Service.|
|Signals that the player is declining to reconnect to the game instance after disconnecting.|
|Provides player with connection information for the game instance. This is useful for a player if they disconnect and later decide to reconnect.|
|Triggers an update of the custom data held within the platform for a game instance.|
MatchApi (game server) SDK methods #
The SDK calls invoke various Matchmaking Plugin methods through Matchmaking service RPCs. For a list of Matchmaking service RPCs, see the MatchmakingService reference page.
Game Instance Service Bindable Events #
There are several game instance-related events that player clients and game servers can listen to. The following tables contain bindable events relevant to the Game Instance service, along with associated descriptions of when the event is triggered.
Player Client Events #
The following events are handled by the player client.
|Game instance allocation fails due to game server issues after matchmaking succeeds.|
|The game server starts a game instance and is available for parties to connect.|
|Connection to the platform is established after disconnecting during an active game instance.|
|A game instance is forcibly terminated because it’s no longer communicating with the engine.|
|The game server has removed the player from the game.|
Game Server Events #
The following events are handled by the game server.
|A game instance is started.|
|An error occurs while attempting to start a game instance. The game server will not continue reporting capacity or receiving new game instances until |
|The platform fails to process a keep alive request.|
|The platform decides to terminate an in progress game instance. An example of this firing is when a game instance has failed to heartbeat due to connection issues to the platform. Calling |
|The platform sends new players to the game server to add to the game instance. Upon receiving, the game server should invoke |
|A player declines to reconnect to the game they were in. Includes the game instance ID and player ID respectively.|