Queues and pools
Queues
A queue contains a mutually exclusive set of tickets that you can match together. Tickets in a queue will not be matched with tickets found in another queue. This behavior is useful when building a game with discrete game modes that don't overlap, such as Team Deathmatch, Free-For-All, and Capture the Flag. It’s also useful in a game where the type of game is different, such as a competitive game with Ranked and Unranked modes.
Default queue
The default queue serves as a fallback queue if the ticket created does not specify the name of the queue. This fallback method allows you to dynamically switch to the default queue after the game goes live without changing the game client.
This ability to fall back to the default queue also supports legacy versions of Matchmaker where the game clients do not specify queue names. Therefore you do not need to update your game client to include a queue name when migrating your services.
Pools
A pool represents a dynamic separation of tickets within a queue. Pools contain filters that indicate which tickets the pool will process. The matchmaker assigns tickets that do not match the filters of a pool to a subsequent pool. If the ticket is not compatible with any of the pools, it uses the default pool of that queue.
For each pool, it is possible to specify hosting information as well as the matchmaking logic to use when building matches with the tickets within the pool.
In this way, you can separate pools by platform by using filters to target the specific platforms, such as a console or Windows. You can also use pools to target regions, such as North America, the European Union, or Asia.
Default pool
Similarly to queues, the default pool serves as a fallback to make sure you can still process tickets that are not compatible with any other pool. If we take our example with pools for each region, the default pool would be used to put players in a fallback region.
Filters
A filter is a way for pools to decide which tickets it will process. When a client creates a matchmaking ticket, custom values can be added under the Attributes
section. These attribute values are the ones used in pool filters.
The matchmaker supports two types of values: text
and numbers
and the filters currently support four operations =
, !=
, <
, and >
.
If a pool contains multiple filters, all the filters must pass in order for a ticket to be accepted in this pool.
Examples of filters
Here's an example of a pool that matches tickets only on a Windows platform:
Field | Operator | Value | Description |
---|---|---|---|
Platform | = | Windows | The platform attribute in the tickets must be equal to `Windows`. |
Ticket attributes:
Unity SDK
var attributes = new Dictionary<string, object>
{
{ "platform", "Windows" }
};
JSON
"attributes":[{
"platform":"Windows"
}
]