Skip to main content

Introduction to Matchmaking

Last updated on September 19, 2023

Overview

The Matchmaking service provides a set of features developers can use to coordinate players into groups to participate in. The groups are based on selected preferences, such as game mode and language, and attributes stored for players, such as MMR, in order to provide well balanced competition.

Using these preferences and attributes, the service will generate a match ticket, and queue that ticket into a match pool to be evaluated.

The service supports three primary types of matchmaking by default, but can also be configured to handle complex scenarios where two or more types are combined. The primary types are:

  • Team-based Matchmaking: matching players into teams, to compete against each other. Team size and minimum player requirements can be defined as part of the ruleset.
  • Skill-based Matchmaking: matching players based on skill level, by comparing defined attributes to determine a good match. Attributes and the criteria to compare by can be defined as part of the ruleset.
  • Role-based Matchmaking: matching players based on an in-game role they have selected to play during a game session, often as part of a team. Role requirements for the game session and teams can be defined as part of the ruleset.

Additionally, the service can be extended using our gRPC plugin, which allows developers to customize our implementation according to their needs.

In this section we will review key concepts related to the Matchmaking service, the player flow when matching, and best practices when using the service. Additionally, following this, there is a set of guides on how to integrate and configure the service included for reference.

Key Concepts

Before integrating the Matchmaking service, it is important to understand some concepts that have been used throughout the design of the service.

Game Mode

A game mode provides a distinct gameplay experience for players such as Player-verses-Player (PvP), free for all, co-op, and others. The matchmaking service supports multiple game mode definitions, including separate matchmaking logic for each mode. This allows unique criteria to be defined, such as skill ranking or team composition, for grouping players together. To define a game mode, check out the Session service documentation on how to configure a Session Template.

Game Session

A game session is an instance of a game mode where matched players are connected to interact with each other, and complete the objective for the specified game mode. Game sessions can be deployed to Dedicated Servers, or hosted locally on the game client computer for peer-to-peer play.

Team Composition

For team based game modes, team composition refers to the number of players that can participate as part of a team, as well as any role specific requirements needed to balance out a game session. Additionally, the number of teams required to participate, including the minimum number of players per team, are configurable as part of the match ruleset.

Match Ticket

A match ticket represents a player or party during matchmaking, containing the attributes and parameters necessary for the match ruleset to compare, and optimally determine, the fitness of a match.

Match Pool

Also referred to as a queue, a match pool defines a segment of players and parties, represented as tickets, based on selected preferences such as game mode, region, language, etc. Once in a pool, tickets will be evaluated in turn, and based on the match ruleset defined for the game mode, paired together and connected to a game session.

Match Ruleset

A match ruleset defines the logic used to compare tickets during matchmaking, to ensure they are optimally grouped based on the experience desired per game mode. The Matchmaking service reviews tickets queued in the corresponding pool, to determine fitness of a match.

Match Function

A match function defines the behavior that the service will use to evaluate tickets waiting in the queue. By default, it will use the logic defined in match rulesets, but through use of our gRPC Plugin new functions can be implemented that extend how the service works.

Backfilling

During gameplay, it may become necessary for a game session to request new players to be added. Backfilling is the process by which the game session can submit a ticket to the Matchmaking service, to receive proposals for new players, which can then be accepted or rejected. Game sessions can be configured to auto-backfill through the Session Template, or it can be left up to the game server to manage directly.

Matchmaking Flow

This section reviews the flow experienced by players, to match into a game session either as a solo player or as part of a party.

  1. A player (party leader) creates a party, and invites friends to participate if desired. They then select the desired game mode, and set any preferences available to them.
  2. Once ready to start playing, the party leader initiates matchmaking, which creates a match ticket and queues it into a match pool.
  3. The service then evaluates the ticket based on the logic defined in the match ruleset, in order to find optimal matches.
  4. When a match is found, the service requests a game session from the Session service, and attaches the ticket information to the session.
  5. The service will also create a backfill ticket for the game session, so additional matches can continue to be found until the desired number of players are identified.
  6. Players will receive an invite to join the game session, once they are selected as a match, and if they agree, will be connected.
  7. Once the game session is full, gameplay can commence.