question

martinliu1993 avatar image
martinliu1993 asked

Photon PlayFab integration

Hi, I am in the process of using Photon as a custom matchmaker, while hosting a dedicated server on PlayFab, and I have a few questions in regards to whether or why PlayFab needs to talk to Photon for custom authentication.

Currently, I am handling the PlayFab authentication flow simply by calling LoginWithCustomId. Since I am using Photon matchmaker rather than PlayFab one, after the login is successful, I create a lobby room using Photon match maker, and pass the user info as room settings.

From reading here and here, it seems like PlayFab + Photon integrations requires me to pass Photon Auth Tokens, and the server to call AuthUser as well. I don't quite understand why I have to do that, if I am handling the login logic myself using PlayFab.

In general, I'd like to get a better understanding of the matchmaking flow required to use Photon Matchmaker. I know what calls I have to make using PlayFab matchmaker, but what calls do I still have to make to use a custom matchmaker? Do I only need to call Client::StartGame? How do I tell PlayFab to spin a server down, once the lobby is empty?

Thanks

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

·
brendan avatar image
brendan answered

Well first, there's isn't a "need" to use that authentication, per-se. It's there as an alternative. So, using our integration, you would sign the player into PlayFab and then just use GetPhotonAuthenticationToken to get a token that you can use for authentication with Photon. The AuthUser API call is actually not related to this at all - that's for if you want to have your own custom matchmaker. And a custom matchmaker would actually be for use with hosted game servers, rather than Photon Realtime. For Photon Realtime, none of the matchmaking calls in PlayFab are used. For example, StartGame is only used if you're hosting custom game servers in our service. Short version - for Photon Realtime, you can use our authentication integration (GetPhotonAuthenticationToken), but you would only use their matchmaker.

10 |1200

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

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.