Starting Matchmaking
Last updated
Last updated
In order to access online features, the player must be logged in with the Online Subsystem. Please visit the Authentication page for more information.
You can start matchmaking by using the StartKronosMatchmaking
node. To make the required matchmaking parameters simply drag off of the "Matchmaking Params" property and search for "make". You can also do the same for the "Host Params".
There is no hard requirement on where you need to call this from. Most games will probably have this hooked to the OnClicked
event of a widget button.
After matchmaking is complete the player will join the game automatically. We do not need to do anything else.
The "Host Params" is going to be used if the matchmaking results in creating a new session. It is the same set of parameters that you use to create matches with. For more information please refer to the Creating Matches section of the documentation.
The "Host Params" can be left empty if the NoHost
option is enabled in the "Matchmaking Flags".
The "Min Slots Required" param tells the matchmaking system to ignore sessions that do not have at least X amount of open slots. We can use the GetPartySize
node to easily determine how many slots we need. This node returns the number of players in the party, or 1 if the player is not in a party. By using this we basically avoid sessions that we would not fit.
The "Playlist", "Map Name", and "Game Mode" params are purely cosmetic information used for session filtering. When these parameters are given for the matchmaking, sessions have to match their corresponding params to be considered for joining. If left empty, all sessions will be considered as valid. As an example I'm going to set my playlist params to the following (without the quotes):
Playlist: "PVP"
Map Name: -
Game Mode: "Deathmatch"
I have intentionally left the "Map Name" empty so that it will not be considered. I just want to find a "Deathmatch" game, I do not care which map it is currently being played on.
Please refer to the Using Skill Ratings section of the documentation.
The "Extra Query Settings" param allows you to add custom Query Settings that the matchmaking will use during session searches. These settings are essentially filters that will compare against the session's corresponding Session Setting.
IMPORTANT: Different Online Subsystems may not support all types of query settings. The Steam Online Subsystem for example does not support bool
settings.
It is important to note that Kronos has a two layer session filtering process. First, sessions will be queried by the Online Subsystem using the given settings. Once sessions are found, all results will be filtered again. This was necessary due to the Null Online Subsystem not handling query settings.
Query settings registered with the "Extra Query Settings" param are used for filtering at both layers automatically. However, if you are not registering query settings through this param, then you have to override the FilterSearchResult
function of the KronosMatchmakingSearchPass
in C++ and handle your query settings manually. Again, you only need to do this if you are not using the "Extra Query Settings" param.