question

Dominik Dopplinger avatar image
Dominik Dopplinger asked

Matchmaking for racing games

Hi,

we currently evaluate playfab and other services for a racing games we want to make. My current item: matchmaking. And don't really know how to use playfab for our matchmaking needs.

Our use case in a nutshell:

  • We have a racing game
  • A user can have several drivers
  • A driver can have several vehicles
  • A vehicle can be tuned with exchangeable parts
  • Every driver has an ELO-based rating
  • We have several maps
  • Every map has several tracks
  • Maps/tracks support several game modes

The easy matchmaking is playing with friends by sharing your lobbyID.

The hard thing is the "normal" matchmaking where players select a driver, a vehicle, a map, a track and a game mode and want to be matchmaked.
There should also be the possibility to provide only some information and be matchmaked (e.g. driver, vehicle, and game mode)

How can we do this?

Cheers, Dodo

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

omareyoussef avatar image omareyoussef commented ·

@Brendan

In which price plan(s) is matchmaking available??

Thank you

,

@Brendan

In which price plan(s) is matchmaking available??

Thank you

0 Likes 0 ·
brendan avatar image
brendan answered

You have a couple of different options for matchmaking, when you're talking about custom game server hosting.

The first (and most common among AAA titles) is that you can use your own matchmaker logic to drive all matches, while we still manage all the spin up/down and management of servers. You would use the Matchmaker API for this (https://api.playfab.com/Documentation/Matchmaker).

The second is that you can use the default PlayFab matchmaker, which gives you the ability to match players based upon Region, Game Mode, and a Statistic (ELO, in your case). It sounds like you may be considering further bucketization, based upon other factors (like vehicle). If so, you should consider using a custom matchmaker, since that would give you the most flexibility. However, in that case I would highly recommend a rapid back-off in your matchmaking logic to remove some of the buckets if you don't find a match quickly. Bear in mind that the more you bucketize players, the smaller each group potentially becomes, making it harder to find matches with players of similar skill.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dominik Dopplinger avatar image
Dominik Dopplinger answered

Hi Brendan,

can we run our matchmaking server on your machines?

Cheers, Dodo

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

While we can host your custom game servers, we're not really set up to host a custom matchmaker right now. The requirements are different enough that our current game server hosting wouldn't really be applicable.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

webmaster avatar image
webmaster answered

Hi Brendan - Another question.

Ideally, we would like to use Playfab's matchmaker. One thing we would like to be able to do, however, is to do something like this:

- First try to matchmaking with ELO score difference of no bigger than X

- If after a certain amount of time, there is no match, then we try to matchmake with a slightly bigger allowable difference.

- wait a bit, expand a bit more..

Is this doable?

Alternatively, and related question - for the default Playfab MatchMake()'s Statistics parameter, does it look for the best match within a certain amount of time window? Basically trying to understand the trade-off between the quality of the match, and the time it takes to make a match.

Thanks,

Andrew

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

The way the PlayFab matchmaker works is that it finds all sessions that have available slots, which match the "must have" criteria - Build Version, Game Mode, and Region - and filters that based on Tags. If there's no statistic provided for the match, it just picks randomly from that list. If there is a statistic provided, it orders the available sessions by the ABS difference between the input statistic, and that of the active session, returning a session from the top of the list (closest to the input score). But it never waits - it always immediately returns the closest match, or if one cannot be found, either "no match found" or a new session, depending on whether you start sessions on calls to matchmake or not.

I can think of somewhat convoluted schemes that would allow you to use our matchmaker the way you describe - joining the session, checking the stat difference, leaving, getting another search result, etc. - but you would need to make sure you're throttling the Matchmake calls from the client so that you're not hitting the service with many calls per user, introducing delays in the process. Also, since players would be "locking" slots in sessions briefly (as a result of the Matchmake call, the slot is "claimed" for a minute), that would also reduce the efficiency of the operation.

What you're really looking for is "queue" matchmaking, in which the player asks for a match and waits for one to be found that's within the range requested - the match call doesn't return until it finds one, or hits a timeout. We do have a backlog item for such a matchmaker, but it is not something that's on our schedule for the near-term. For now, if you have a requirement for this type of matchmaking, I would have to recommend using a custom matchmaker.

5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

webmaster avatar image webmaster commented ·

@Brendan

here is another idea. I want to see if you think it could work. Let's say we have a elo ranking range of 0~1000. We break that range up into 40 tags each of which include 25 ranks.

The idea is that when a player tries to join a match:

1) He first specify a tag that matches his rank (StartNewIfNoneFound=false), if that fails

2) try another tag that's 1+ his own tag.

3) try another tag that's 1- his own tag

4) If none are found, then he starts a new server with his own tag using StartGame() call. Wait for # seconds (say 20s).

6) If still no match, then terminate his server. Look for a match that doesn't have a tag restriction. (basically match against anyone available)

7) If still no match, start an unrestricted match of his own and wait for an opponent.

Could this work? We am really trying to avoid making our own matchmaker server.

0 Likes 0 ·
brendan avatar image brendan webmaster commented ·

To be honest, I'd advise against it. For one thing, you'll have the issue that anyone at the top of the Tag range is going to only get players at or below his ELO, making it harder to advance (since beating a lower ELO player results in little to no change to your own).

What I would recommend is having a second custom game server build which you also run, and which acts as your custom matchmaker. We have a few titles that do this - one is an MMO, where they have a "city" build, which is very lightweight in terms of how much CPU/memory it needs per player, so a thousand players could be in one. They can meet up there, and match into teams that go off to their "dungeon", which is a separate server build (focused on the actual gameplay).

0 Likes 0 ·
Brian Jordan avatar image Brian Jordan commented ·

@Brendan just curious -- any rough sense you can share of whether a "queue matchmaker" or any other matchmaker enhancements might be in the cards for this year / next year / later?

0 Likes 0 ·
brendan avatar image brendan Brian Jordan commented ·

We're discussing the future of matchmaking across the board with the rest of the Microsoft team. We want to move to providing more advanced queue-style matchmaking, as well as async matchmaking, as soon as we can. But no, right now we do not have a specific date for that.

0 Likes 0 ·
Brian Jordan avatar image Brian Jordan brendan commented ·

Thanks for the update, & good luck with the integration, sounds exciting!

0 Likes 0 ·
webmaster avatar image
webmaster answered

@Brendan So the custom matchmaker examples - are you guys hosting those? If so, do players "matchmake" into those servers first via Playfab, before they are matchmaked into the real server?

Basically, we are trying really hard to not have to run & maintain our own servers... We looked at some stateless server (eg. Lambda), but they don't seem like the most efficient choice... Let me know if you have suggestions.. thx!

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

Sorry, what custom matchmaker examples are you referring to?

0 Likes 0 ·
webmaster avatar image webmaster brendan commented ·

I was referring to the custom matchmaker in your prior response, where you said some of your clients are creating a second custom gameserver as the matchmaker. Just trying to understand how that worked. thx

0 Likes 0 ·
brendan avatar image brendan webmaster commented ·

Ah, I see. Yes, in the example above ("city" servers which then feed player groups to "dungeons"), they are hosting both server types in our service. The players use the normal PlayFab matchmaker to get to the "city".

0 Likes 0 ·
omareyoussef avatar image
omareyoussef answered

@Brendan

In which price plan(s) is matchmaking available??

Thank you

,

@Brendan

In which price plan(s) is matchmaking available??

Thank you

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

The PlayFab Matchmake API can be used in any tier. As stated above though, it is specifically for getting players to your dedicated servers (either hosted with us or not).

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.