PlayFab API Implementation

I have made some pretty major updates to my public PlayFab example. The sample now has a much more reasonable authentication flow where the user is automatically signed in using a generated id. The user can then opt to upgrade the account to use username and password.

I’m starting to feel happy with the example and will probably leave it as is until someone asks for some specific improvements or some examples of how to use specific PlayFab API methods.

7 Likes

Hey,
i tryed out your example and extracted stuff i need for my usage. Thanks for this example!
But i miss some informations about matchmaking. My project should be a roundbased peer to peer game, so i just need to bring the different games together (i guess)
Is there any possibility to do that with PlayFab? I didnt find anything in their docs.

I believe PlayFab supports matchmaking. Google PlayFab and Matchmaking and you should get hits in the client API.

hanged out with FlayFab today. They have Defold logo on the booth, and they were willing to do a blogpost with a Defold user/team willing to talk nicely about PlayFab.
So if you use Playfab, and want some free publicity, talk to me please.

Also I asked about multiple leaderboards option, and they’re working on a proper implementation. But there’s a workaround today (they suggested to use their forum for support).

Also… any other feedback/question to Playfab - tell here so I bring talk to them tomorrow.

3 Likes

Does anyone know the current status of Playfab vs. Defold? In a talk by Microsoft today at PGC London I spotted a Defold logo on one of their slides, so I wondered what part(s) of their SDK has Defold support.

1 Like

I don’t use it a lot, but it works, for example, for leaderboards in my old games.

2 Likes

They have full Defold support as far as I know and have had so for several years. They generate all of their SDKs from an API definition and it is done automatically on every API change.

3 Likes

Wow! Then this is by far the best option for multiplayer in Defold. Many thanks!

2 Likes

We are using Playfab for our latest game and it works great! Only thing I do miss is a messaging system enabling server to message clients in different ways. This is possible using only Push Notifications atm.

4 Likes

Which services are you using? Multiplayer?

2 Likes

No not multiplayer on this title. But mostly everything else.
Economy, push notification, game logic(cloud script), segmentation and A/B test, store
Not tracking though as we are doing a lot of offline gameplay and firebase is then much more suited for that

5 Likes

Just for info… There are 2 versions for the API - classic and Entity Model. PF recommend that the latter is used.
When i tried using the Entity Model API, i found an issue and reported to them and they have pushed a fix yesterday but i have not tested that yet. Details at https://community.playfab.com/questions/36698/is-getentitytoken-required-after-loginwithcustomid.html

4 Likes

@britzl: I noticed that the playfabexamples are using ludobits version 6.7.1.
I tried to use the latest ludobits version 6.9.1 but “savetable” seems to mess up the auth file (on Windows 10).

I then tried the exmaples of ludobits and although the savetable example seems to be working, the file is unreadable, when I open it with notepad++
Not sure if I should post it on the github also

Please do!

I’ve started using Playfab again (we were using it a little last year, then dropped it) and am trying out the Entity file system for cloud saves.

I noticed that if the upload exceeds 16K, it fails like this:

NotImplemented
Value provided for Transfer-Encoding is not implemented.
status = 501

My best guess is that this relates to how chunked encoding is used for payloads over 16k since 1.2.166, and maybe Playfab requires gzip or something else. I’m not enough of an expert in HTTP to know where the fault lies here - if servers are required to support chunked encoding. Does anyone know?

Ok, so this seems to indicate that PlayFab doesn’t support the chunked transfer encoding. And the chunked encoding is required if POSTing more thank 16k of data.

Is there a documented limitation in the size of a PlayFab cloud save? 16kb seems small.

I’ve been able to upload a large (7MB) file using cURL (without specifying any particular transfer-encoding)

When I add -H “Transfer-Encoding: chunked” to the cURL request, the server initially complains that the x-ms-original-content-length header is missing, which appears to be some detail of Azure storage.

If I supply that, it fails just like in Defold/lua.
There’s an interesting (but possibly not relevant) note in the cURL docs -

This assumes that you know you do this against an HTTP/1.1 server. Before 1.1, there was no chunked encoding, and after version 1.1 chunked encoding has been deprecated.

I think we need to upgrade the http request code in Defold to solve this. We need to research exactly what to upgrade. Should we upgrade to support a newer version of TLS? Or something else? Please create a ticket on GitHub!

Is Entity file system available on the free plan? I’m not sure. Also as I remember on player data json there is limit for 10 Kbytes. (I haven’t tried Playfab file system)

Yes it is, as I said I was able to upload small files (<16KB) with Defold, and large files (7MB) with cURL, all on the free plan.

1 Like