question

Patrik Bertilsson avatar image
Patrik Bertilsson asked

Persistent turn based games, 10 Shared Group Limit.

Hello, Thank you for an amazing service!
I think the Azure integration needs some more work and better documentation but it's getting there! :)

I am designing a Turned based wordFeud similar game. It was easier to work with Cloudscript before the Azure Functions as there was more documentation for API and syntax but after a lot of hazel I got it working.

My Flow:

1. When a player starts a new game I put them in a photon room and create a ShardDataGroup with a unique ID.

2. If another player joins the room I close the room and add the player to the shared data.(Azure functions)

3. I keep track of the turn in the Shared Data and let the user with the correct turn modify it.

4. This works fine and they play.

5. A player searches for a new game and a new SharedDataGroup is created.

My Questions:

1. I now read there is a Limit on 10 Shared Group Data per user dose this mean that I can only have ~10 active game at the same time in this setup? I read a lot on this topic and I though with this setup I would be able to have 100 active games but I think I misread it somewhere?

2. I also read you are flexible with a contract around this as it's not a "hard limit" is the pricing for such a setup not worth it? You can send me an email on pb@gamerce.net

Possible solutions:

1. I could skip shared group data all together and just have cloud script writing directly to the users accounts with the data.

2. Have 1 shared group data per user keeping track of open games where I store a playfabID/gameID and when game starts have the cloud script write to the shared data, as I see it the problem here would be Many users could potential write to the Shared Group Data via the cloud script.

Last question,

Can I have the old cloud script solution open for the title:

Title ID
80664

Cheers,
Patrik

CloudScriptShared Group Data
10 |1200

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

Gosen Gao avatar image
Gosen Gao answered

The limit you mentioned should be Shared group data updates per request, 10 is the number of shared group data key/value pairs which may be updated in a single request. You can navigate to [Game Manager]->[Title settings]->[Limits] for more info.

Shared Group Data does not have a strict maximum limit, but it should be as small as possible. To keep it small, you can call API DeleteSharedGroup to delete the Shared Group Data when it is no longer used.

As for the re-enable CloudScript issue, If your title has used Legacy CloudScript before, we can re-enable it for you.

10 |1200

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

Patrik Bertilsson avatar image
Patrik Bertilsson answered

Hey,

Thank you for the quick reply!

Shared group data updates per request

Aha great so then it's not a problem having around 10-50 shared groups per user depending on how many active games that user has.

As for the re-enable CloudScript issue

Was on my other titles and projects I used Cloud Script,this is a new title so I do understand if you cant enable it here.

It was more of a wish as the Azure Functions pipeline is not ideal for my development pipeline. I see the beauty with Azure functions but documentation and workflow wise I think it's not there yet.

DeleteSharedGroup

What I do is when a game finishes I remove booth users and then it's automatically removed.

Cheers,

Patrik

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.

JayZuo avatar image JayZuo ♦ commented ·

You should be able to use Legacy CloudScript in your new titles now. Cheers!

0 Likes 0 ·
Patrik Bertilsson avatar image
Patrik Bertilsson answered

Hey Thank you!
I have a question regarding shared groups.

A user has a list of games stored on PlayerData (SharedGroupData names) and then the SharedGroupData contains the info/state for the game.

Problem is when the game starts it makes so many calls to playfab.

1. Login call

2. GetTitleData

3. GetPlayerProfile

4. GetUserData

This is where the problem starts:

5. GetSharedGroupData (depending on how many games this will be called 1 for every game)

So if I have 10 active games there will be 10 calls to get the data for each game and know which one is active.

On mobile these calls really makes the experience not that good.

Note* I cant do these calls simultaneous because of some problems with WWW and unity so they are done after each other to avoid issues.

My question:

Right now this is done on the client, will it work better to do a cloud script and have the cloud script get the data for all games then send it back as 1 call? Or is there another way to handle this better?

Cheers,

Patrik

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.