game / pragma.party / PartyService /
PartyService #
internal class PartyService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, instanceCount: Int = pragmaNode.getDistributedServiceInstanceCount(PartyService::class), inviteCodeGenerator: InviteCodeGenerator = InviteCodeGenerator(instanceId, instanceCount), partyClient: PartyClient = PartyClient(), gameInstanceClient: GameInstanceClient = GameInstanceClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), multiplayerClient: MultiplayerClient = MultiplayerClient(), alertingMutexFactory: AlertingMutexFactory = AlertingMutexFactory(), partyManager: PartyManager = PartyManager(), partyProxy: PartyProxy = PartyProxy(), gameServerCompatibility: GameServerCompatibility = GameServerCompatibility(), notificationClient: PartyNotificationClient = PartyNotificationClient(), timeProxy: TimeProxy = TimeProxy()) : DistributedService, RoutingIdGenerator, ConfigHandler<PartyConfig>
The PartyService is a game loop service where players may join up with each other, configure their game settings, and enter matchmaking together.
Constructors #
PartyService | fun PartyService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, instanceCount: Int = pragmaNode.getDistributedServiceInstanceCount(PartyService::class), inviteCodeGenerator: InviteCodeGenerator = InviteCodeGenerator(instanceId, instanceCount), partyClient: PartyClient = PartyClient(), gameInstanceClient: GameInstanceClient = GameInstanceClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), multiplayerClient: MultiplayerClient = MultiplayerClient(), alertingMutexFactory: AlertingMutexFactory = AlertingMutexFactory(), partyManager: PartyManager = PartyManager(), partyProxy: PartyProxy = PartyProxy(), gameServerCompatibility: GameServerCompatibility = GameServerCompatibility(), notificationClient: PartyNotificationClient = PartyNotificationClient(), timeProxy: TimeProxy = TimeProxy()) |
Functions #
Name | Summary |
---|---|
Assigns party leader to another player. | |
Cancels a party invite, invoking PartyPlugin.handlePlayerCancelInviteRequest to process the cancel request. | |
Creates a new party, invoking PartyPlugin.initializeParty on the party and PartyPlugin.onAddPlayer for customization of party and player. | |
Development override feature for game server versions. Manually overrides a party’s game server version, and disables any future game server version calculations from occurring within that party. | |
Enters a party into matchmaking. | |
Queries cached party data by party id. | |
Queries cached party data by party id. | |
Joins a party using an invite code. PartyPlugin.onAddPlayer is called to customize the new party player. | |
Joins a party using a party id. PartyPlugin.onAddPlayer is called to customize the new party player. | |
Kicks a player from the party. Only usable by party leaders. Invokes PartyPlugin.onRemovePlayer for kicked player. | |
Removes a player from a party, invoking PartyPlugin.onRemovePlayer. | |
Leaves the party. Invokes PartyPlugin.onRemovePlayer for the removed player. | |
Notification handler for player disconnect. Removes the player from the party they were in. | |
Responds to a party invite. If the invite is accepted, PartyPlugin.onAddPlayer is called to customize the new party player. | |
Called by the matchmaking service to invoke PartyPlugin.returnFromMatchmaking to allow for party state updates in response to no longer being in matchmaking. | |
Sends a party invite. | |
Sets a player’s ping latency map for different game server zones. | |
Sets a player’s preferred game server zones. | |
Sets a player’s ready state, calling PartyPlugin.canChangeReady before allowing the ready state update to apply. | |
Syncs party state from the platform to the client. | |
Updates a party, scoped to yourself. Invokes PartyPlugin.updatePlayer to process updates. | |
Updates a party. Invokes PartyPlugin.updateParty to process updates. | |
Update a party by invoking PartyPlugin.handleBackendUpdateRequest. |