Parties #

The Party service provides an entry point into the game flow. Each party includes party players, party invites, and custom payloads, all of which live on the party object.

Using the Party API, Party plugin, and extension data, developers can create custom party configurations and workflows.

Party leaders #

Each party includes one or more party leaders. By default, the leader is the player that created that party. Party leaders have special permissions that allow them to enter the party into matchmaking, kick players from the party, and appoint additional leaders. Like most features in Pragma, you can customize these permissions. If the party leader leaves the party, another player is automatically chosen to be the leader.

Joining a party #

You can customize how many players a party can support, however a single play can only be in one party at a time.

There are three ways to get a player into a party:

  • Party invites: by default, any party member can send an invite. The invitee can accept or reject the invite, even if the inviter leaves the party before the invitee responds. The sending player can also revoke the invite.
  • Party invite code: each party includes a human-readable invite code that is meant to be shared outside of Pragma so that players can join the party. Any player with access to the code can join the party.
  • Party ID: each party includes a unique party ID. Use this to have backend services facilitate adding players to a party. For example, if a player clicks on a friend’s username to join their party.

Leaving a party #

There are three ways a player can leave a party:

  • Leave voluntarily: players can voluntarily leave a party or move between parties. When a player in a party joins another party, they are automatically removed from the original party.
  • Kick a player: party leaders can kick a player from a party. A kicked player cannot rejoin the party via the public invite code; they must be sent a party invite to return.
  • Automatic removal: players may be removed automatically by Pragma Engine, such as when a session is terminated.

Custom party data #

The Party service provides customizable payloads where you can define data about players and parties.

Party-wide data includes details about the party, such as game mode. By default, all party players can access and update party data, however these permissions can be customized.

Player data includes player-specific details, such as character selection. Only the player related to the data can update it.

When party or player data is updated, the new data is sent to all party players. Pragma also provides a way of storing private data that can be broadcast to specific players.

Party expiration #

You can configure parties to automatically expire after a certain duration (measured from time of access). Parties will be removed after they haven’t been accessed for the full duration of the expiration. This includes actions such as updating party data, adding/removing players, and player/partner client synchronization operations.

By default, the expiration feature is enabled with an expiration time of one day. If you change the configuration value, any existing parties that have not been accessed during the expiration duration will be removed.

Parties and matchmaking #

Party leaders can enter their party into matchmaking when all players are ready. Players can manually ready up, or their ready state can be set programmatically, such as when they select a character.

Once in matchmaking, custom logic compares the party with other parties to create a balanced game. Players remain in their party through matchmaking and game play.