game / pragma.gameinstance / GameInstanceService /
GameInstanceService #
internal class GameInstanceService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, gameInstanceProxy: GameInstanceProxy = GameInstanceProxy(), gameInstanceManager: GameInstanceManager = GameInstanceManager(), notificationClient: GameInstanceNotificationClient = GameInstanceNotificationClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), partyClient: PartyClient = PartyClient(), multiplayerClient: MultiplayerClient = MultiplayerClient(), timeProxy: TimeProxy = TimeProxy.defaultInstance) : DistributedService, ConfigHandler<GameInstanceServiceConfig>
GameInstanceService is a game flow service responsible for creating games, sending connection details to players, and handling any game end processing.
Constructors #
GameInstanceService | fun GameInstanceService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, gameInstanceProxy: GameInstanceProxy = GameInstanceProxy(), gameInstanceManager: GameInstanceManager = GameInstanceManager(), notificationClient: GameInstanceNotificationClient = GameInstanceNotificationClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), partyClient: PartyClient = PartyClient(), multiplayerClient: MultiplayerClient = MultiplayerClient(), timeProxy: TimeProxy = TimeProxy.defaultInstance) |
Functions #
Name | Summary |
---|---|
Adds player to a game by invoking GameInstancePlugin.handleBackendAddPlayersRequest. | |
Sends connection details from the game server to players in a game. | |
Sends connection details from the game server to players in a game. | |
Creates a new game, links the game server to it, and invokes GameInstancePlugin.handleBackendCreateRequest. | |
Creates a new game, then invokes GameInstancePlugin.handleBackendCreateRequest to configure the game. | |
Creates a new game, then invokes GameInstancePlugin.handleBackendCreateRequest to configure the game. | |
Create a new game, invoking GameInstancePlugin.handlePlayerCreateRequest to customize the newly created game. | |
Ends a game, invoking GameInstancePlugin.handleBackendEndRequest. | |
Enters a game into matchmaking, using the GameInstanceMatchmakingPlugin to determine matchmaking data. | |
Adds players to a game by invoking GameInstancePlugin.handleBackendAddPlayersRequest. | |
Called periodically by the game server to signal that a game is still operating normally. | |
Queries cached game instance data by game instance id. | |
Queries cached game instance data by game instance id. | |
Links the game server to the game and returns a GameStart payload for the game instance. | |
Join a game. Invokes the GameInstancePlugin.handlePlayerJoinRequest function to customize game relevant data for the player. | |
Removes a game from matchmaking. | |
Leaves a game, invoking GameInstancePlugin.handlePlayerLeaveRequest. | |
Notification handler for player disconnect. Marks player as REMOVED from a game. | |
Called by matchmaking service if a game has been removed from matchmaking by matchmaking. | |
Remove players from a game, invoking GameInstancePlugin.handleBackendRemovePlayersRequest. | |
Remove players from a game, invoking GameInstancePlugin.handleBackendRemovePlayersRequest. | |
Retrieves the latest cached game instance info for a specific player. | |
Unlinks a game server from a game, invoking GameInstancePlugin.handleGameServerUnlinkRequest. | |
Updates a game by invoking GameInstancePlugin.handleBackendUpdateRequest. | |
Updates a game by invoking GameInstancePlugin.handleBackendUpdateRequest. | |
Updates a player’s game by invoking GameInstancePlugin.handlePlayerUpdateRequest. | |
Verifies that players connecting to the game server are not misrepresenting their pragma identity. |