Matchmaking
Matchmaker queues
Matchmaking is a critical component in every multiplayer game. At Elympics, we have developed a service that is not only straightforward to configure but also sophisticated enough to cater to all your needs.
To manage matchmaking efficiently, you should use the RoomsManager
and rooms that utilize queues.
Whenever a player wants to play a match in your game, they must go through one of your matchmaking queues.
After you create a queue via our Panel or CLI, it's ready to use with the RoomsManager
in conjunction with ElympicsLobbyClient
.
Starting a match
To start a match in a given matchmaking queue, you can simply call the RoomsManager.StartQuickMatch
method and pass the name of the queue as an argument.
Alternatively, you can do so directly from a room. In order to do that, you have two options:
- create a new room with the
CreateAndJoinRoom
method, passing the queue name as a parameter - join an existing room with the
JoinRoom
method
To find available rooms, you can use the RoomsManager.ListAvailableRooms
method.
Once in a room, you can mark yourself as ready by calling IRoom.MarkYourselfReady
.
When all players in the room are ready, the host can start matchmaking by calling IRoom.StartMatchmaking
.
How to change or create queues?
Using web panel
Navigate to "Game Settings" on your game page and create or update queues in the "Matchmaking Queues" section.
Creating queues on game creation
Process of Creating Queues for a Newly Created Game:
-
Create a game by pressing the "New game" button.
-
Submit all your game data and press the "Continue" button.
-
Press the "Create custom" button to create a new queue or press the three dots button on an existing one to edit or remove it.
-
Fill the queue with all the necessary information and press the "Create queue" button.
Updating queues in existing games
Process of creating queues for an existing game:
- Go to the games panel.
- Select your game.
- Press the "New queue" button.
- Fill queue with all necessary information.
- Press the "Create queue" button.
Process of updating queues for an existing game:
-
Press the three dots button on the upper right side of the queue tab and select the "Edit" button.
-
On the newly opened tab, edit your queue parameters.
-
Press the "Update queue" button.
Using CLI
You can use the Elympics CLI Tool to manage queues by following this chapter.
Queue parameters
Every change in elympics configuration needs a few minutes to propagate within our system.
The parameters you can configure for each queue are:
Name
(string): A human-friendly name for the queue used inside Unity to decide which configuration should be applied.MatchType
(SOLO, PAIR, GROUP, or TEAM): Specifies the matchmaking type.NumberOfTeams
(integer): Indicates the number of teams required.PlayersInTeams
(integer): Specifies the number of players in one team.MaxWaitTime
(integer): Sets the maximum waiting time for a player before matching with bots. This parameter also scales player tolerance for imbalance match-ups (see MatchmakingMode).MatchWithBots
(bool): If enabled, players waiting too long are matched with bots after MaxWaitTime seconds.MinPlayersToMatch
(integer): After MaxWaitTime, the matchmaker seeks matches that aren't full. Combined with MatchWithBots, it fills in missing players with bots.MatchmakingMode
(ACCEPT_ALL, FASTEST_MATCHING, FAST_MATCHING, BALANCED, FAIR_MATCHING or MOST_FAIR_MATCHING): Defines matchmaking behavior in terms of balancing wait times and fairness. It also affects how quickly players' tolerance for imbalance changes. ACCEPT_ALL is similar to a greedy approach, meaning that matches will be created whenever there are enough players in the queue.
Debug mode, debug mode with bots
The Debug mode
and Debug mode with bots
options transform any queue you join into a debug mode, applying a 'greedy' matchmaking strategy. This means a match is found as soon as there are enough players. The Debug mode with bots additionally includes bots if not included originally. These modes are useful for testing new builds without the need to switch queues.
You can set those options using our CLI:
elympics games versions update -g <your-game-id> -v <your-game-version-id> --debug-mode true --debug-mode-with-bots true
Player rankings
Rankings are calculated per game using both the ELO method and a more advanced approach that converges quickly to the player's actual skill level. Rankings are used for all match types and are shared across all your queues and match types. To calculate it properly, you need to send valid MatchmakerData after each ended match within your game.
Matchmaking across versions and region
Queue that is configured in your game can be spawned multiple times with different context. Each game version will have its own copy to not mix players that joins with different game versions. Matchmaker will also not mix players that play in different regions.
Machine-learning-based matchmaking in duel matches
For 1v1 games (MatchType
PAIR
) we employ Machine Learning. Randomized control groups are used to evaluate match effectiveness. The ML model takes in the player's MatchmakerData
(ranking) during matchmaking to balance your game based on player skills.
This functionality requires a certain number of matches before fully leveraging machine learning.
Social queues
This is an early version and this behaviour could be changed in a future release. Feel free to submit your ideas on how to improve this.
Concept
Social Matchmaker Queues offer the ability to assign players to subqueues of already defined queue.
Example flow of matching friends:
- Player 1 chooses queue
Default
with a randomized suffix (i.e.:3c2t35bMyPwDc5Lt
) and uses it in their game - Player 1 passes this information to Player 2
- Player 2 uses information about queue received from Player 1
- Player 1 and Player 2 join this queue
- Player 1 and Player 2 are matched into the same match
- Flow of joining continues as normal
Usage
queueName
has to be the name of a queue defined in Elympics (using Panel or CLI).
You just use queueName:suffix
instead of queueName
in the ElympicsLobbyClient.Instance.RoomsManager.CreateAndJoinRoom
method.
Rooms
Rooms are our solution for lobby management.
They are the fundamental, primary component our matchmaking system operates on.
The IRoom
interface allows for seamless interaction with the room properties and states,
making it simple to receive all necessary information about any room.
To access a specific room, use the CurrentRoom
property or the TryGetAvailableRoom
method from RoomsManager
. You can also iterate over the list available through the ListAvailableRooms
method.
Room state
The room state, accessible through the IRoom.State
property, is represented by various properties that provide information about the current status of the room, such as:
RoomName
- the name of the room.JoinCode
- an optional code that can be used to join the room.PrivilegedHost
- indicates whether the host has privileged status. A non-privileged host can start matchmaking. A privileged host can kick players, manage room settings, and perform other administrative tasks.IsPrivate
- indicates whether the room is private.Users
- a read-only list ofUserInfo
objects representing the users in the room.Host
- theUserInfo
object representing the host of the room.MatchmakingData
- optional room-specific data related to matchmaking.
Room methods
The following methods of the IRoom
interface are essential for managing room and player state as well as matchmaking itself within the Elympics matchmaking system:
MarkYourselfReady
- marks the player as ready for a match.MarkYourselfUnready
- marks the player as unready for a match.StartMatchmaking
- starts the matchmaking process. This method can only be called by the host once all other players have calledMarkYourselfReady
.CancelMatchmaking
- cancels the ongoing matchmaking process.PlayAvailableMatch
- connects to the game server if there is a match available in the room. This method loads the gameplay scene in the non-additive mode.Leave
- leaves the current room.
Custom data
Rooms allow developers to add their own additional information through custom room data.
It can be accessed using the IRoom.State.CustomData
and IRoom.State.MatchmakingData.CustomData
properties and set using the CreateAndJoinRoom
method or updated by calling the IRoom.UpdateRoomParams
method.