Amazon GameLift
Developer Guide (Version )

Design a FlexMatch Matchmaker

A FlexMatch matchmaker process does the work of building a game match. It manages the pool of matchmaking requests received, forms teams for a match, processes and selects players to find the best possible player groups, and initiates the process of placing and starting a game session for the match. This topic describes the key aspects of a matchmaker and how to configure one customized for your game.

To create a matchmaker, define a matchmaking configuration using either the Amazon GameLift console or the AWS CLI (see Create a Matchmaking Configuration). You can configure as many matchmakers as you need for your game.

For a detailed description of how a FlexMatch matchmaker processes the matchmaking requests it receives, see How Amazon GameLift FlexMatch Works.

Matchmaker Configurations

At a minimum, a matchmaker needs three elements:

  • The rule set determines the size and scope of teams for a match and defines a set of rules to use when evaluating players for a match. Each matchmaker is configured to use one rule set. For more information on creating rule sets, see Build a FlexMatch Rule Set.

  • The game session queue determines where matches created by this matchmaker will be hosted. The matchmaker uses the queue to find available resources and to place a game session for the match. A queue specifies which regions to use when placing a game session. For more information on creating queues, see Create a Queue.

  • The request timeout determines how long matchmaking requests can remain in the request pool and be evaluated for potential matches. Once a request has timed out, it has failed to make a match and is removed from the pool.

In addition to these minimum requirements, you can configure your matchmaker with the following additional options.

Player Acceptance

You can configure a matchmaker to require that all players selected for a match must accept participation. If acceptance is required, all players must be given the option to accept or reject a proposed match. A match must receive acceptances from all players in the proposed match before it can be completed. If any player rejects or fails to accept a match, the proposed match is discarded. The matchmaking requests are handled as follows: requests where all players accepted the match are returned to the matchmaking pool for continued processing; requests where at least one player rejected the match or failed to respond fail and are no longer processed. Player acceptance requires a time limit, which you can define; all players must accept a proposed match within the time limit for the match to continue.

Matchmaking Notification

This feature emits all matchmaking-related events to a designated Amazon Simple Notification Service (SNS) topic. Since matchmaking requests are asynchronous, all games must have a way to track the status of matchmaking requests, and setting up notifications is simple and efficient. See more on options for tracking requests in Add FlexMatch to a Game Client. To use notifications, you first need to set up an SNS topic, and then provide the topic ARN as the notification target in the matchmaking configuration. See more information on setting up notifications at Set up FlexMatch Event Notification.

Game Properties

When requesting a new game session, you can pass additional information to your game server about the type of game session to create. Game properties can be delivered with any type of game session request--with a placement request or with a matchmaking request. With matchmaking, game properties are included in the matchmaker configuration. All game sessions created using a matchmaker use the same game properties. If you need to vary game properties, create separate matchmakers and send matchmaking requests to the matchmaker with the appropriate game properties.

Reserved Player Slots

You can designate that certain player slots in each match be reserved and filled at a later time. This is done by configuring the "additional player count" property of a matchmaking configuration.

Custom Event Data

Use this property to include a set of custom information in all matchmaking-related events for the matchmaker. This feature can be useful for tracking certain activity unique to your game, including tracking performance of your matchmakers.