Matchmaking #

The Pragma Matchmaking service is responsible for matching players together into games quickly and at scale. The service is designed to support many gameplay scenarios, from match-based PVP to battle royale to cooperative multiplayer games. For competitive games, skill-based matchmaking logic can be authored to evaluate criteria such as skill level (mmr), game modes, latency / connection quality, and more.

Entering matchmaking #

Players must be in a party to enter matchmaking. When a party leader enters the party into matchmaking, the party is treated as a single item on a Matchable object. You can think of a Matchable as a container for parties in matchmaking.

Players can leave matchmaking at any time. When they do so, their whole party is removed from matchmaking.

Matchmaking queues #

You can separate Matchables into different matchmaking queues to ensure only certain parties will be matched together. Parties in different queues will never be compared, and thus will never enter a game instance together.

Each queue is defined by its unique Matchmaking queue key. A matchmaking queue key contains a game server version that splits queues by the version of the game server, and a custom proto (ExtMatchmakingKey) to define variables you want to use to split queues.

Matching parties #

Matchables in the same queue are compared to each other using custom logic defined in the Matchmaking Plugin. Parties can move between Matchable objects until the Matchable represents a group of parties that should be sent to a new game instance together.

New game instances that have been created can remain in matchmaking or reenter it at any time to accept more players.

Matching with existing games #

To find additional suitable players for an in-progress game, the existing game can enter matchmaking as a Matchmaking Game Instance object. Parties on the Matchmaking Game Instance are compared to existing Matchables based on custom logic that can differ from the logic used when matching initial parties. Parties can move from Matchables to the Matchmaking Game Instance until the logic is satisfied, at which point the existing game is updated with the found parties.

Maintaining data in matchmaking #

When entering matchmaking, a snapshot of the party’s state is captured, including player and party selections. The Matchmaking service uses the values stored in this snapshot even if a user makes changes to the player or party while the party is in matchmaking. The exception to this is when a player leaves a party. If a player leaves a party while the party is in matchmaking, the whole party is removed from the Matchmaking service.

Similarly, when a game instance enters matchmaking, the game instance reference is kept up to date to ensure accurate matches.

Teams #

You can group players into teams and determine whether all party players are required to be on the same team. This allows for a scenario where a developer wishes to split the players or parties into opposing teams when necessary for MMR balancing.