Sign In Register

How can we help you today?

Start a new topic
Answered

Matched players - now what?

I really like the ease of matching players through GameSparks Matches. Everything works perfectly and matches are found almost instantaneously - but now what?


In the response i recieve a matchId, but what am I supposed to use that for? I actually thought that Matches would just create a challenge, which I could then continue to work with. I could just naturally create a challenge between the two matched players, but since there is no global message for match found, there is no obvious place for me to do that. If I create it in the response or request message, then I would create two challenges for each match.


Am I going about this all wrong and have I completely misunderstood the use of matches?


Any help will be much appreciated :) 


Best Answer
Hey Rolf,

So the matchID you get is used to check against matches that you have made, and get match-details back, most usefully, getting the player-IDs back so you can challenge them like you said.
[here]

If you wanted to do this in script you could use player.SendRequest() to send a CreateChallengeRequest() in your cloud code after the match has been found, though typically the matches are for the players to seek out opponents for their own challenges. Therefore you would use the FindMatchRequest() to find a match, and then call the CreateChallengeRequest() afterwards, if the player wants to setup their own challenge.
[here]

Does that help?

 


Noone has any feedback?

Answer
Hey Rolf,

So the matchID you get is used to check against matches that you have made, and get match-details back, most usefully, getting the player-IDs back so you can challenge them like you said.
[here]

If you wanted to do this in script you could use player.SendRequest() to send a CreateChallengeRequest() in your cloud code after the match has been found, though typically the matches are for the players to seek out opponents for their own challenges. Therefore you would use the FindMatchRequest() to find a match, and then call the CreateChallengeRequest() afterwards, if the player wants to setup their own challenge.
[here]

Does that help?

 

It helps a lot. Thank you very much!


If I could make a suggestion, then it would be great if you could specify a challenge shortcode in the FindMatchRequest(), and have it automatically create that challenge with the matched players, and having the FindMatchResponse contain the newly created challengeID. Or simply create a globalMessage for when a match is made.


Anywho, this is still great. Have a fantastic day :)

Login to post a comment