question

misokrupicka avatar image
misokrupicka asked

viability of the architecture

hi,

we would like to design a realtime 3d game (simple 3d using Unity) with tens of player in a room using the integrated Photon Cloud (Photon Add-ons page in PlayFab)

for the player movements/shooting - we would like to use unreliable UDP

is this possible? (unreliable UDP) - is there a demo we can look at (PlayFab + Photon realtime + unreliable UDP)?

is this a viable plan considering all the latencies among the client/PlayFab Cloud/Photon Cloud?

thx

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

The integration of PlayFab with the Photon Cloud has two primary components: authentication and webhooks. What this means is that you can authenticate your players with PlayFab, and then use that authentication to get a token for communication with Photon Cloud, and you can write JavaScript handlers that live in Cloud Script in PlayFab, which are called for key actions in Photon Cloud (Room joined, Room data updated, etc.). For a realtime game with low-latency communication between players, you would authenticate your players with PlayFab, then use the Photon Cloud matchmaker to find a Room in the region for the player. Joining that room would give you the lowest latency scenario for your game session. You can read more about the Photon Cloud functionality - and specifically Photon Realtime, which you would use for this design, in the Exit Games documentation, here: http://doc.photonengine.com/en-us/realtime/current/getting-started/realtime-intro.

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

misokrupicka avatar image misokrupicka commented ·

hi,

i've looked at the documentation at the link you have provided

i am also trying to match an existing working demo - for example https://github.com/PlayFab/UNION-OpenSource-MOBA with the Photon documentation

but i am failing to understand why - for example - there is no reference to LoadBalancingClient in the MOBA demo source code (specifically - the 'private LoadBalancingClient client;' line mentioned in the Photon documentation)

basically i am trying to identify a sample source code (preferrably a whole game) that will match the newest documentation/best practices for playfab+photon

thx

0 Likes 0 ·
brendan avatar image brendan misokrupicka commented ·

Unfortunately, the UNION example is very out of date at this point. For examples of best practices for using Photon Realtime, I would recommend the examples on the Exit Games site (http://doc.photonengine.com/en-us/realtime/current/getting-started/realtime-intro).

What you need for the two integration points with PlayFab are authentication and webhooks. And the webhook calls are made automatically, when Rooms are joined, left, etc. For the authentication piece, please have a look at this post from the Photon folks (Hamza, specifically): https://community.playfab.com/questions/379/206721607-connect-to-photon.html

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.