Skip to main content

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.

Almost all multiplayer games need some kind of matchmaking service to group players into matches. With Elympics, you don't need to worry about it, because we've got you covered. To manage matchmaking efficiently, you should use the RoomManager and rooms that utilize queues.

Whenever a player wants to join your game, they must go through one of your matchmaking queues. After you create a queue via our CLI or Panel, it's ready to use with the RoomManager in conjunction with ElympicsLobbyClient.

To start a match, simply call the RoomManager methods such as StartQuickMatch() to start a quick match. If you want to start a specific match, you need to have a room with the desired parameters. In order to do that, you have two options:

  • Create a specific room with CreateAndJoinRoom(), passing the queue name as a parameter.
  • Join an existing one with JoinRoom().
tip
  • To find available rooms, you can use RoomManager.ListAvailableRooms().
  • Matchmaking can only be started by the host and when all players are ready. To set readiness status, simply use IRoom.MarkYourselfReady().

After joining the desired room, simply use IRoom.StartMatchmaking() as the host to start matchmaking.

How to change or create queues?

Using CLI

You can use the Elympics CLI Tool to manage queues by following this chapter.

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 Game by pressing New game button

Create Game

  • Submit all your game data and press Continue button

New Game Panel

  • 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

New Game Panel 2

  • Fill queue with all necessary information and press Create queue button

Queue Modal

Updating Queues in existing games

Process of craeting queues for an existing Game:

  • To create a new queue go to the games panel, select your game, press the New queue button, fill queue with all necessary information and press Create queue button

Queue Modal

Process of updating queues for an existing game:

  • Press the three dots button on the upper right side of the queue tab and select Edit button

Queue Modal

  • On this tab, edit your queue parameters and press the Update queue button

Queue Modal

Queue Parameters

info

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: Specifies the matchmaking type such as SOLO, PAIR, GROUP, or TEAM.
  • NumberOfTeams (integer): Indicates the number of teams required. One player is considered a team.
  • 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 | 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 valid send MatchmakerData on the end of 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. The same situation will happen if you have more then one region. If this is is the true. Matchmaker will not mix players that want to play in different regions.

Machine learning based matchmaking in duel matches

For 1vs1 games (MatchType PAIR) we use Machine Learning for matchmaking, using randomized control groups to evaluate match effectiveness. The ML model uses the player's MatchmakerData (ranking) during matchmaking to balance your game based on player skills.

tip

This functionality requires a certain number of matches before fully leveraging machine learning.

Social Queues

info

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.

Sample flow of matching friends:

  1. Player 1 chooses queue Default with a randomized suffix (i.e.: 3c2t35bMyPwDc5Lt) and uses it in their game
  2. Player 1 passes this information to Player 2
  3. Player 2 uses information about queue received from Player 1
  4. Player 1 and Player 2 join this queue
  5. Player 1 and Player 2 are matched into the same match
  6. Flow of joining continues as normal

Usage

caution

queueName has to be name of a queue defined in Elympics (using Panel or CLI).

You just use queueName:suffix instead of queueName in ElympicsLobbyClient.Instance.RoomManager.CreateAndJoinRoom() method.

Matchmaking

Our solution for matchmaking is based on rooms. Rooms provide an easy and clear way to handle matchmaking through the room Manager. The room Manager offers a simple interface for creating, joining, and managing rooms, making it straightforward to pair players into matches. This approach ensures that the matchmaking process is efficient and developer-friendly.

Custom Room Data

Rooms allow developers to add their own additional information to a room through custom room data. To access the custom room data, navigate to IRoom.State.CustomData.

Custom Matchmaking Data

Rooms allow developers to add their own additional information related to matchmaking to a room through custom matchmaking data. To access the custom matchmaking data, navigate to IRoom.State.MatchmakingData. In custom matchmaking data, essential information such as the type of bet must be included.

tip

You can add custom room data and custom matchmaking data during room creation using the CreateAndJoinRoom() method or update existing data using IRoom.UpdateRoomParams().

User Info

The UserInfo record is a data structure used to store information about a user. It contains several properties that provide details about the user's id, team affiliation index, readiness status, and user nickname.

Match Data

The MatchData record is a data structure used to store information about a match. It provides details about the match's state, the match ID, match details provided by MatchDetails, and any failure reasons.

Match Details

The MatchDetails record is a data structure that provides detailed information about a match. It includes information about matched players, server addresses, user secrets, game engine data and matchmaking data.

Room

Rooms are our solution for lobby management. Rooms are the fundamental component of our matchmaking system and are the primary entities operated on by the matchmaking system. The IRoom interface allows for seamless interaction with the room properties and states, making it simple to recieve all necessary information about desired room. All rooms provide us with information such as:

  • RoomId
  • RoomState
  • RoomName
  • JoinCode
tip
  • In order to recieve the specific room use TryGetJoinedRoom() or TryGetAvailableRoom() from RoomManager

Room State

The room state in Elympics is represented by various properties that provide information about the current status of the room, such as:

  • RoomName
    • Description: The name of the room.
  • JoinCode
    • Description: An optional code that can be used to join the room.
  • PrivilegedHost
    • Description: Indicates whether the host has privileged status.The PrivilegedHost status determines the level of control a player has within the room. Non-privileged host can start matchmaking. A privileged host, can kick players, manage room settings, and perform other administrative tasks.
  • IsPrivate
    • Description: Indicates whether the room is private.
  • Users
    • Description: A read-only list of UserInfo objects representing the users in the room.
  • UserInfo
    • Description: The UserInfo object representing the host of the room.
  • RoomMatchmakingData
    • Description: Optional data related to matchmaking for the room.

Room Methods

These functions are essential for managing player readiness, matchmaking processes, and room states within the Elympics matchmaking system. Developers can use these methods to handle the various stages of player interaction with the matchmaking and room management system.

  • MarkYourselfReady()
    • Description: Marks the player as ready for the match.
  • MarkYourselfUnready()
    • Description: Marks the player as unready for the match.
  • StartMatchmaking()
    • Description: Starts the matchmaking process.
  • CancelMatchmaking()
    • Description: Cancels the ongoing matchmaking process.
  • PlayAvailableMatch()
    • Description: 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()
    • Description: Leaves the current room.

Room Manager

The IRoomManager is an interface accessible via ElympicsLobbyClient.Instance.RoomManager. It is designed to provide a simple and efficient solution for developers to manage game rooms. The RoomManager contains all the necessary elements to control matchmaking through a combination of events and methods. Key features of IRoomManager are:

  • Access to the available rooms list
  • Controlling joined room status updates
  • Matchmaking data information
  • Creating new rooms
  • Joining existing rooms

These functionalities are available using the following methods and actions:

Actions

tip

All actions and methods are available in ElympicsLobbyClient.Instance.RoomManager.

  • RoomListUpdated
    • Description : This action is triggered when the list of available rooms is updated. It launches whenever the list changes.
    • Parameters : RoomListUpdatedArgs which contains information about the updated list of room Ids.
  • JoinedRoomUpdated
    • Description : This action is triggered when the data of the joined room is updated. It launches whenever any data in the joined room changes.
    • Parameters : JoinedRoomUpdatedArgs which contains information about the updated room id.
  • JoinedRoom
    • Description : This action is triggered when a user successfully joins a room.
    • Parameters : JoinedRoomArgs which contains information about the room id that was joined.
  • LeftRoom
    • Description : This action is triggered when a user leaves a room.
    • Parameters : LeftRoomArgs which contains information about the room id that was left and leaving reason.
  • UserJoined
    • Description : This action is triggered when another user joins the room.
    • Parameters : UserJoinedArgs which contains information about the room id and user info of user who joined it.
  • UserLeft
    • Description : This action is triggered when another user leaves the room.
    • Parameters : UserLeftArgs which contains information about the room id and user info of user who left it.
  • UserCountChanged
    • Description : This action is triggered when the number of users in the room changes.
    • Parameters : UserCountChangedArgs which contains information about room id the change in user count in it.
  • HostChanged
    • Description : This action is triggered when the host of the room changes.
    • Parameters : HostChangedArgs which contains information room id and new host id.
  • UserReadinessChanged
    • Description : This action is triggered when a user's readiness status changes.
    • Parameters : UserReadinessChangedArgs which contains information about room id, user id and his new state.
  • UserChangedTeam
    • Description : This action is triggered when a user changes their team.
    • Parameters : UserChangedTeamArgs which contains information about room id, user id and his new team index.
  • CustomRoomDataChanged
    • Description : This action is triggered when custom room data changes.
    • Parameters : CustomRoomDataChangedArgs which contains information about room id and newly added room data.
  • RoomPublicnessChanged
    • Description : This action is triggered when the public status of the room changes.
    • Parameters : RoomPublicnessChangedArgs which contains information about room id and its new privacy state.
  • RoomNameChanged
    • Description : This action is triggered when the name of the room changes.
    • Parameters : RoomNameChangedArgs which contains information about room id and its new name.
  • MatchmakingDataChanged
    • Description : This action is triggered when matchmaking state changes.
    • Parameters : MatchmakingDataChangedArgs which contains information about room id.
  • MatchmakingStarted
    • Description : This action is triggered when the matchmaking process starts.
    • Parameters : MatchmakingStartedArgs which contains information about room id.
  • MatchmakingEnded
    • Description : This action is triggered when the matchmaking process ends.
    • Parameters : MatchmakingEndedArgs which contains information about room id.
  • MatchDataReceived
    • Description : This action is triggered when match data is received.
    • Parameters : MatchDataReceivedArgs which contains information about room id, match id, queue name and match data.
  • CustomMatchmakingDataChanged
    • Description : This action is triggered when custom matchmaking data changes.
    • Parameters : CustomMatchmakingDataChangedArgs which contains information about room id and newly added matchmaking data.

Room Manager Methods

These functions are essential for managing room states, tracking available rooms, and handling matchmaking processes within the Elympics matchmaking system. Developers can use these methods to efficiently create, join, and manage rooms.

  • TryGetAvailableRoom()
    • Description: Used to attempt to retrieve an available room by room ID.
  • ListAvailableRooms()
    • Description: Used to retrieve a list of available rooms.
  • TryGetJoinedRoom()
    • Description: Used to attempt to retrieve a joined room by room ID.
  • ListJoinedRooms()
    • Description: Used to retrieve a list of joined rooms.
  • StartTrackingAvailableRooms()
    • Description: Used to start tracking available rooms. After launching this method, you will start receiving calls from RoomListUpdated.
  • StopTrackingAvailableRooms()
    • Description: Used to stop tracking available rooms.
  • CreateAndJoinRoom()
    • Description: Used to create a new room. This function returns a newly created IRoom. After the function ends, the user is already joined in the room.
  • JoinRoom()
    • Description: Used to join an available room. There are two ways of joining a room: by Guid or joinCode.
tip

You can only join private room by passing joinCode.

  • StartQuickMatch()
    • Description: Used to start quickmatch, quickmatch rooms are destroyed after ending the game.