Sign In Register

How can we help you today?

Start a new topic

Custom MatchMaking on Player Fields and Location

there is another thread with exact same question.
https://support.gamesparks.net/support/discussions/topics/1000080628?page=1

but no exact solution was provided.
so i am reposting the issue again. Expecting an example code from someone.

thanks


Hi Ahsan,

The answer supplied there was to give a general guide towards an implementation solution without limiting any of the options available. I think Custom Match making might be a route you can consider to achieve this, we have some documentation here on it (https://docs.gamesparks.com/tutorials/multiplayer/matching-players.html#customizing-matching)

You can use Custom Query when you want more complex rules for grouping Pending Matches. Each participant in a Pending Match can have a Custom Query, which is specific to them as a player seeking a match, that can be run against a different Pending Match to see if the two Pending Matches can be joined. In this way, you can use a Custom Query to impose tight conditions on when Pending Matches can be joined.

 

A simple example of using this capability would be for players who only want to be matched with people playing in their own country. To do this, each MatchMakingRequest will contain Participant Data and a Custom Query to prevent the requesting player from being put into a Pending Match where there are players from another country. I hope this helps.


Kind regards,

 - Steve

 Something like this...

{
  "@class": ".MatchmakingRequest",
  "customQuery": { "country" : { "$eq" : "IE" } },
  "matchShortCode": "shortCode",
  "participantData": { "country" : "IE" },
  "skill": 1
}

Login to post a comment