suppose my game is a 3v3, 3 parties use PartyMatchmakerAdd, each party has 2 people, can they match together? My wish is that every party member should be in the same team, how to avoid this situation? The ideal situation should be 2 parties plus a passerby to become a team
Suppose my game is a 3v3, 3 parties use PartyMatchmakerAdd, each party has 2 people, can they match together?
@tom can you help me with this?thanks
Currently all 3 parties (assuming 2 players per party) can match into a game for 6 players yes. This is because the matchmaker has no knowledge that your game should be a 3v3 match and only knows that it should try and put 6 players together.
We are currently actively working on some improvements to our matchmaking functionality and this includes the ability to write custom matchmaking logic that would allow you to account for criteria such as this. This feature will be available in Nakama 3.17.
In the meantime, one workaround is to use the Match Listing API to manually search for active matches and have the parties join a match that has enough space for all party members to be on the same team.
The general flow here would be to have an RPC that a player/party leader can call when they want to join a match. This RPC would use the Match Listing API to search for all active matches that have enough room for the whole party to be placed on a single team. In this case you would need 3+ spaces in the match for a party and 1+ spaces for an individual.
This can be achieved by using a match list query such as:
query := "+label.available_spaces>=3"
label.available_spaces is not a built in property, you would need to ensure that the match handler keeps the label up to date when players join and leave via the MatchLabelUpdate Function.
When a match is found, the RPC should return the match ID and the player/party can then join it. If a match isn’t found that has enough spaces, a new match can be created instead.
Hope this helps.
thanks。waiting for 3.17
I wonder 3.17 release time .thanks
We plan to release 3.17 in a couple of months but this may be subject to change.
I found MatchmakerOverride here。is this feature above related？thanks。 @tom
Yes that’s correct. You can learn more about this new feature in our documentation: Heroic Labs Documentation | Matchmaker
thanks。Can you give some example about above？
My understanding is to traverse a set of matching results, check whether each match meets the requirements, keep the matches that meet the requirements, re-match the ones that do not meet the requirements, or write the code yourself to achieve re-matching? @tom
We’re currently working on improving the documentation for this new feature to include code samples. You’re understanding is correct in that you use this function to verify which matches Nakama has made should be kept and which should be discarded based on whatever criteria you see fit. You would not re-match participants in this function, only tell Nakama which matches it should make. The return result from this function should include only the matches you want to be made.
I want to know if the group that was matched last time failed, will the group that was successfully matched be matched again next time, so that there will be an endless loop. Will the system disrupt the random re-matching every time the real matching function is performed?
The current released version outputs all possible combinations of matches, so you can pick whichever match you want. This may be adjusted in an upcoming patch, we’ll add a limit of combinations for each ticket and they’ll likely be formed from random subsets.