I've got a game that uses a similar structure to the Hearthstone tutorial example - though it also uses a real time script.
My problem at the moment is that when the challenge is "won" the match & pending match instances still exist so when the player goes back to the lobby then starts matchmaking again the matchmaker gives that player the same match they were just participating in. I've found the player has to logout then back in to be able to search for a new game again.
When the challenge is finished, how do I also "finish" the match instance?
Also, just in case I have something wrong with my matchmaking code - after successfully matchmaking, should I have a pending match AND a match instance or should the pending match disappear as soon as the match is made?
Best Answer
C
Customer Support
said
over 5 years ago
Hi Andy,
Apologies for the delayed response. Once all the players drop out of the match the match will end. As long as one player is still in it the match will exist. If it's drop in/drop out then sending a MatchMakingRequest with the action set to "cancel" the player should be fully removed from it. Example below.
Anyone able to help me here? I'm currently trying to get around this by logging the user out then back in to purge the match but that doesn't seem ideal.
Is there no easy way to say to GameSparks "this match is over, please remove it so the player can look for a new one"?
A
Andy Richdale
said
over 5 years ago
Bump
A
Andy Richdale
said
over 5 years ago
Hmm I may have found the issue - I'd assumed "drop in/out" meant that players could rejoin if they disconnect but I think I've realised it means that if player 1 and player 2 are matched, then player 2 disconnects, player 3 can join in to the match... So in that case it'd make sense for the match to stick around after one player leaves. I think turning drop in/out off will solve the problem, will try now :)
Customer Support
said
over 5 years ago
Answer
Hi Andy,
Apologies for the delayed response. Once all the players drop out of the match the match will end. As long as one player is still in it the match will exist. If it's drop in/drop out then sending a MatchMakingRequest with the action set to "cancel" the player should be fully removed from it. Example below.
Try that and let us know if you have any further questions.
Regards,
Liam
A
Andy Richdale
said
over 5 years ago
Hi Liam. Thanks for your answer. I did eventually figure out that drop in/out was the cause of the issue in my case, I've switched that off and it's working as expected now.
But that's good to know about the "cancel" action for matchmaking. I wasn't aware of that request, so I'll keep that in mind also :)
A
Andrey Karpenko
said
about 5 years ago
Is there a comand in cloud code to cancel the certain match?
A
Andrey Karpenko
said
about 5 years ago
Is there a way to get current match id in MatchmakingRequest cloud code?
Andy Richdale
I've got a game that uses a similar structure to the Hearthstone tutorial example - though it also uses a real time script.
My problem at the moment is that when the challenge is "won" the match & pending match instances still exist so when the player goes back to the lobby then starts matchmaking again the matchmaker gives that player the same match they were just participating in. I've found the player has to logout then back in to be able to search for a new game again.
When the challenge is finished, how do I also "finish" the match instance?
Also, just in case I have something wrong with my matchmaking code - after successfully matchmaking, should I have a pending match AND a match instance or should the pending match disappear as soon as the match is made?
Hi Andy,
Apologies for the delayed response. Once all the players drop out of the match the match will end. As long as one player is still in it the match will exist. If it's drop in/drop out then sending a MatchMakingRequest with the action set to "cancel" the player should be fully removed from it. Example below.
Try that and let us know if you have any further questions.
Regards,
Liam
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstAndy Richdale
Anyone able to help me here? I'm currently trying to get around this by logging the user out then back in to purge the match but that doesn't seem ideal.
Is there no easy way to say to GameSparks "this match is over, please remove it so the player can look for a new one"?
Andy Richdale
Bump
Andy Richdale
Hmm I may have found the issue - I'd assumed "drop in/out" meant that players could rejoin if they disconnect but I think I've realised it means that if player 1 and player 2 are matched, then player 2 disconnects, player 3 can join in to the match... So in that case it'd make sense for the match to stick around after one player leaves. I think turning drop in/out off will solve the problem, will try now :)
Customer Support
Hi Andy,
Apologies for the delayed response. Once all the players drop out of the match the match will end. As long as one player is still in it the match will exist. If it's drop in/drop out then sending a MatchMakingRequest with the action set to "cancel" the player should be fully removed from it. Example below.
Try that and let us know if you have any further questions.
Regards,
Liam
Andy Richdale
Hi Liam. Thanks for your answer. I did eventually figure out that drop in/out was the cause of the issue in my case, I've switched that off and it's working as expected now.
But that's good to know about the "cancel" action for matchmaking. I wasn't aware of that request, so I'll keep that in mind also :)
Andrey Karpenko
Is there a comand in cloud code to cancel the certain match?
Andrey Karpenko
Is there a way to get current match id in MatchmakingRequest cloud code?
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics