question

Ian Chen avatar image
Ian Chen asked

How to pass mode/map data to server with Playfab match making?

Hello,

There's a "SessionCookie" property in RequestMultiplayerServer API which can be used to pass game mode/map info to the server.

But while using Playfab match making with server allocation enabled, how can we pass such info to the server?

Thanks.

Matchmaking
10 |1200

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

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

While using PlayFab matchmaking you can define matchmaking rules, PlayFab matchmaking will allocate sessions based on these rules. We don’t need to pass session cookies manually per time.

10 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.

Ian Chen avatar image Ian Chen commented ·

So how can the server know what mode/map to load while allocated by PlayFab matchmaking?

By calling GetMatch(); and get those attribute value?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Ian Chen commented ·

Yes, you can call GetMatch() if you need those attribute values. MatchMaking helps to allocate sessions, so we don’t need to get session cookies in our server code, matchId will be passed to the server instead of session Id.

1 Like 1 ·
Ian Chen avatar image Ian Chen Sarah Zhang commented ·

OK....Thanks for the clarification!

But there's still something confusing me.

How can the server know it was allocated by which Queue?

For example, we may have a matchmaking queue for "DeathMatch" which need 4~16 players and a queue for "Capture The Flag" need 8~32 players, and both of the Queue will allocate the same server build.

Since GetMatch() require "QueueName" as its parameter, how can the server know the queue name that allocated it?

0 Likes 0 ·
Show more comments

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.