Sign In Register

How can we help you today?

Start a new topic

Party Based Matchmaking with External Dedicated Server

Hello,


We are wondering if the following is possible, and how it may be achieved. We are using UE4 if that matters, although most of this should be related to the GSparks events and what not.


1. We would like to create a party or group using GSparks and have player data of each party member delivered so that we can display UI widget with party member informations


2. Begin matchmaking as a party to fill in the remaining vacant slots OR choose to start a private match with only the current party members (based on user defined match settings)


3. Once the match has been filled (or contains the party members in case of private match) we would then have the player at index 0 in the player list contact our dedicated server service to create a server and wait until a reply is received. (The only GSparks interaction here is the notification of the match being "ready")


4. Once our server has replied, we need to transmit the data to each player in the current match to instruct them to connect to the dedicated servers IP address


5. Once the match as ended, player clients remove themselves from the match (and our dedicated server), but must remain in the party once returning to a menu


We do not see an implicit party or group functionality in GSparks and we do not see any "party matchmaking". Is what we outlined achievable with your services? 




 From my understanding, a Pending Match is automatically created upon the first MatchMakingRequest. You can verify this by querying the NoSQL system collection pendingMatches.

Hey again,


I've been trying to make the matchmaking, but I've encountered some kind of dead end.


If i need 4 players to start the match, and i have 5 players matchmaking (3 individual, 2 in a team), let's say this is the sequence they start the matchmaking:

- player 1 starts MMR and in the response he does FPM in cloud code and finds no match

- player 2 starts MMR and in the response he does FPM in cloud code and finds no match

- player 3 (that is in party with player 4) starts MMR and in the response he does FPM in cloud code and finds no match. here should he try to wait for a match, or create a pending match and add player 4 to it?


The problem is that if a pending match is create, there is no kind of response to trigger a script in order to make the decision for the match based on the teams.


So the question mostly is: is there a trigger script when a pending match is created from MMR? And how should i make the process of cloud scripts, which cloud scripts should i use (example on matchmaking request/response, matchfound request/response, etc..) in order to achieve the above scenario correctly?


Sorry if the scenario is not clear... and thanks in advance!

Thanks a lot Christopher. Appreciate your help!
Yeah you can just hardcode a value in.
It just worked, It was because of not putting a "matchGroup"... But why should I put it? It is optional, should I put it by default for all players the same value?
Yes i have 3 tabs of test harness opened in the browser, and 3 different authenticated players. Once i start MMR on the 3 players during the first 10 seconds, i try to FPMR on any of the 3 players multiple times, until i get a match not found response in the end. I tried the same skills from the example on the players, and the same thresholds are put in the Matches. And i did try with skill 0 on all, still get the not in progress error
I'm assuming that that you have two test harnesses open and you are submitted MMR both at same time and doing FPMR at same time? If that doesn't return anything, what are the skill # being input?

 

I did do it, I followed the example here with the same values and put it to manual

https://docs.gamesparks.com/tutorials/multiplayer/matching-players.html


But still get that error

You need to do MatchMakingRequest on a Match that is set to Manual, only then can you see pending matches.
Hey Christopher, Yes u are right that it would return match not found after 60 secobds if u follow the same example in the manual matchmaking, which i did follow. And i have also tried to find pending matches during these 60 seconds, with the same thresholds put in the example, and same skills, and same everything, but i can't seem to find a pending match, i receive a "NOT_IN_PROGRESS" error.
@Elie, Pretty sure MatchMakingRequest will return MatchNotFound after 60 seconds.

 

Hey Liam,


Thank you for the fast reply!


It is crystal clear now, but as I saw in the documentation I should start a MatchmakingRequest before creating a pending match, or try to find a pending match?


If not, then I won't be able to make use of the matchmaking algorithm of thresholds and such using the manual matchmaking, then I'll have to make my own algorithm for it.


And one more point - I still haven't thought about it - How am I to keep all the pending matches find each other in a way that no pending match would stay for long. For example, If a team creates a pending match, then two others create two more pending matches, those two others might get matched together, and the first one stays matching. It should be more of a first come first server thingy.


Thanks in advance!

Hi,


You can use the following to create a pendingMatch in Cloud Code.

 

Spark.getConfig().getMatchConfig(shortCode).createPendingMatch(matchGroup, skill, players)

//players should be an array of SparkPlayer objects

 

You could create a custom event that gets the member ids of a team/friends with a GetTeamRequest or a ListGameFriendsRequest. The GetTeamRequest is probably better as you can just consider the players in the team as the party members.Once in the pendingmatch the players will be matched with other players looking for a similar match. This could be a single player sending a MatchMakingRequest or another party that has been created with a pendingMatch.


To make use of the manual matching feature you would put players into a pendingMatch. You'd then send a FindPendingMatchesRequest to return a list of compatible matches and finally use a JoinPendingMatchRequest to join the match of your choice. I hope that clears it up for you. If you have any further questions just let me know.


Regards,

Liam

Hey Derek,


Were u able to make this work using cloud code? I am trying to create a similar scenario where the matchmaking is done with a party. But unfortunately I am not that good in cloud code, trying different things with no success.


If you are able, or someone else maybe from customer support, to provide a working example of matchmaking with parties, that would be very useful to anyone trying to implement it.


Thank you


2 people like this
There's a switch in Matches window for "manual matching"

 

Matches

Manually match players - For custom completion of the matching process. Select this if you do not want the Match to complete automatically when all matching criteria have been met, but want to use your own custom mechanism to complete the Match. The platform will find players that meet the matching criteria for you, but you control the choice of which players are put in the Match.

Login to post a comment