question

Richard Rayner avatar image
Richard Rayner asked

Can i do realtime P2P authoritive in unity with Playfab?

my game is P2P where one 'client' hosts a match and others join that client. the game is realtime single screen multiplayer. I wish to use xbox matchmaking and have players invited/join via their xbox contacts.

I did use unity unet as it allows for this but there is no xbox live matchmaking for this, photon appears not to do this? so can playfab do this? there is so much documentation i have no idea what to look for.

10 |1200

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

Richard Rayner avatar image
Richard Rayner answered

thanks for the reply.

The P2P element of the question was because I don't want or need to host games on azure servers, the game will host its own 'match' and others will join it, or it will join and existing match. I have this code already working in unity UNET, which is deprecated. if playfab has its own way of implementing this I can use it, if not its no problem, i'll just keep the UNET system.

it looks like the two elements I need from playfab are - matchmaking and xbox integration.

when I played around with the code last night, it seems that if a user isn't logged in using a 3rd party system, then it forces an account login or anymous based on device id. since multiple users can be on the device, this wont work. however i'm hoping xbox provides auth detail for guest accounts to allow this to work. otherwise, it looks like the concept of multiple users per device isn't really suitable?

does the xbox SDK you get from the creators program give access to the xbox logins, matchmaking and acheivements via playfab?

if the only way to achieve this is through the private party, i'm a bit screwed right now since i'm one-man-banding my first indie game.

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.

Seth Du avatar image Seth Du ♦ commented ·

>>since multiple users can be on the device, this won’t work

We suggest joining random generated string to the device ID because you still need to get the device ID in the client then pass it to the request of login related APIs. This solution can work if you are trying to save multiple guest accounts on a device.

---

In terms of Xbox integration, before we would reach out to the Xbox third-party team to verify your status as a registered developer for Xbox Live. But for now we have simplified the process, We remove the need to provide a business partner certificate. Now, to get the Xbox token, simply call Xbox Live SDK GetTokenAndSignature("POST", "https://playfabapi.com/ ", "")

Here is the Documentation: https://docs.microsoft.com/en-us/gaming/xbox-live/get-started/get-started_nav

PlayFab doesn’t have a built-in achievement feature but has matchmaking system.

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

There are basically three things to do:

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.