Sign In Register

How can we help you today?

Start a new topic

Party Based Matchmaking with External Dedicated Server


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? 

A: When inviting player to party who accepted: create new team like "{playerId}party" (similar to friends list), have other player join team.

B: When matchmakingrequest, check existence of team: "{playerId}party"

C: If team exists, loop through players in team and add them to match.

Yes, you will need to do the manual matchmaking option.

Ah, okay!

1. Player 0 (leader) invites players 1 through N

2. When one of player 1 through N accept the invite check for the {playerId}Party

- If exists, add player to team

- otherwise, create the team

3. When matchmaking, only return matches with enough player slots, then loop over team and add to match (can this be done in one request or is there way to reserve slots?)

- If a match with enough slots is not found (or the party size == max match size) create a match and add players to it (again, can I create a match and add players in a single request to make sure those players are the ones who get in)

There's a switch in Matches window for "manual matching"



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.

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


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.



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!

@Elie, Pretty sure MatchMakingRequest will return MatchNotFound after 60 seconds.


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.
You need to do MatchMakingRequest on a Match that is set to Manual, only then can you see pending matches.

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

But still get that 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?


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
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?
Yeah you can just hardcode a value in.
Login to post a comment