I need some help finding the correct way to make matches in my game.
First I will describe how I want it to work. Then I will explain what I have done already and why it isn't working.
I am making a game where 2 to 4 players can play by taking turns.
I have my player matching screen come up where I have the users all enter a pin and then hit a "search for players" button.
I have a list that starts empty where I will show players as they search for the same pin and game type. As soon as at least 2 players have searched for the same pin a "start game" button appears.
At this point the users can hit the start game button or wait for more players to "attach".
If the time waiting expires, but at least the minimum players has been reached then they can start the game. If the time has expired and there are not at least 2 players then the game expires. If 4 players search then the game can start.
That is what I would like to happen.
What I have done is when a player hits the search for players button I hook the MatchFoundMessage, MatchNotFoundMessage and MatchUpdatedMessage. I then issue a MatchmakingRequest.
In the GS server I created a Match object. I set the min players to 2 and the max to 4. I added a threshold object with a absolute timeout value and enabled the Accept Min Players. Manually matching is OFF.
What happens is that as soon as the 2nd player does their match making request I get the MatchFoundMessage and no one else can search.
If I change the min players to 3 then 3 people can attach to the game, but 2 cannot.
Can someone please help me find a tutorial that does what I would like to do without a ton of work? Seems like GS should be able to handle this kind of request.
I am doing all this in Unity, so need it to work with the 220.127.116.11 Unity SDK.
Im newb, but my understand is that you cant check the accept min players on the firsts threshold, you need to create a second (the last one) threshold and than this one will be the "ultimatum" and NEEDS to have the accept min players checked.
Its not very intuitive, cause you have to split the timing between the thresholds, and Id rather have an unique time (and then if it ends it either fails or success if min players are matched).
Will I get updates as people search for the same match and can they start the match any time before the minimum players occurs?
Is there a tutorial on how to do this?
"Will I get updates as people search for the same match and can they start the match any time before the minimum players occurs?
Is there a tutorial on how to do this?"
Id like to know that too.
The only thing I know is that you get a MatchUpdate Message each time a match request matchs a player (another match request).
Theres something about manually matching on the tutorials (I havent tried manually matching):