Matchmaking

The zeuz Matchmaking service adapts to the required complexity of a games matchmaking.

Developers are able to configure the Matchmaking rules through zeuz Control Panel or zeuztool, choosing either simple property-based rule sets or advanced developer-defined matching functions.

Queued users are globally partitioned into batches according to the Matchmaking configuration and user population. This provides both top-notch performance and the freedom to match players arbitrarily across regions.

The Matchmaking configuration is flexible enough to allow asymmetric sessions where players can join a game-specific unique match party with freely defined characteristics like min/max size and properties.

The service also allows to match whole teams against each other or teams versus players. This is achieved by treating persistent or ad-hoc teams as virtual players for the purpose of matchmaking.

Configuration

Field Description Type
QueueLen Waiting duration for players in queue Microsecond
SessionTimeout Timeout at which any user request expires if not refreshed Integer
BucketSize Matching is done in buckets, this determines the size of them Integer
TickInterval Interval at which the matchmaker runs Microsecond
Opt Freeform data field, passed down in the Matchmaking Result
SigninKey Key for signing the Matchmaking Result (so servers can verify its content)
Expressions see below Expression
Maps see below Expression

Maps

For Matchmaking several Maps can be defined, each Map can contain several Teams and each Team can contain several Slots.

Here is an example of the Map configuration in JSON format:

{
  "Name" : "map01",  //map identifier
  "UserCount" : {"Min" : 2, "Max" : 4},
  "Teams" : [
    {
      "Name" : "allies",  //team identifier
      "UserCount" : {"Min" : 2, "Max" : 4},
      "Slots" : [
        {
          "Name" : "gunner",  //slot identifier
          "UserCount" : {"Min" : 0, "Max" : 2},
        },
        {
          "Name" : "driver",  //slot identifier
          "UserCount" : {"Min" : 0, "Max" : 2},
        },
      ]
    }
  ]
}

Expressions

See Expressions for syntax details.

Three expressions can be defined: Map, Ranking and Compare.

Map

If no map expression is configured then the map parameter in the Matchmaking request is interpreted as comma separated list of possible map names, an empty string means every map is allowed.

If a map expression is configured, it is executed for each map with the variable prefix map_ being the current map and params_ being the params from the request. It must evaluate to a bool stating if this map is allowed to be used.

See Matchmaking for params.

Example:

map_Name == "map01" && params_Somevalue >= 5

Ranking

The ranking expression is optional too, if it is empty the value rank from the parameters of the request is used to determine the sorting order of players to be matched together. The expression must evaluate to a float, the params are directly accessible as variables.

Example:

( wins * 2 ) - ( losses * 0.5 )

Compare

When a one dimensional rank is not sufficient for matching a compare expression can be configured. The matchmaking will execute this expression for each pair of players which are close predetermined by rank. The expression must evaluate to a float representing the difference between these players. The params of both players are accessible with variable prefixes a_ and b_

Example:

( a_rank + b_rank ) / 2 + rndf() * 1000

Team and Slot

For teams and slots there are currently no expressions available but a comma separated list of possible names can be provided in the “params”, empty string means everything is allowed.