question

MoonHeonYoung avatar image
MoonHeonYoung asked

playdata(title) question!

Hello I want to save the save data of my rpg game through updateUserData function.

I want to save all my data in the "savedata" PlayerData(Title) key at once.

My save data has a minimum capacity of 20000byte ~ 200000byte.

(Inventory, stat, skill, etc. all json at a time, then stored in one key)

Initially,

it was limited to 10000 bytes of data limit,

so it could not be uploaded. However, I was able to upload it after changing to the new pricing policy. (300000byte)

Here is the question.

1. If I upload my json data (20kb~200kb) described above at very frequent intervals,

does the problem occur? And is this a good strategy??

(Because the UpdateUserData function must be called whenever the player acquires an item or the status value changes)

2. I can't understand the next item of the new limit. What does it mean??

Player Data updates per request

-Is this the maximum of 10 keys in the request dictionary of one UpdateUserData function?

(But I'm going to allocate all the data to one key, so it doesn't matter to me?)

Player data value size

-Yes, this has increased to 300000 bytes after the price upgrade.

1. Is this limit the total sum of all keys? Or is it a limit on one key?

2. If it exceeds 300000, is there a way to extend the data limit?

(My player json data is rather large.)

Player data value updates per 15 seconds

-I can't understand this well.

Are you saying that you can only call updateUserData function 10 times in 15 seconds??

So, is it saying that you can never call it in Unity's update function?

Player data value updates per 5 minutes

-Same as above, but I am not sure what the 150 update operation means.

If it's a frequently saved game, I think I can save more than 150 times in 5 minutes.

Could this be a problem?

Player data value updates per hour

-Same as above question.

3. In short, I'm making a small rpg game, and I don't want to go beyond the limits of the playfab.

I want to save the client save data (20kb~200kb) in one key,

and I want to update this value at frequent intervals.

(That is, the UpdateUserData function is called about 500 times per minute-with string data of 20kb to 200kb)

Can you give us any advice on the problem or need?

(For example, Are there any negative impacts, such as extra charges or bad performance?

and.. you think the current data is too large, how often should you update it etc.. Are there best practices?)

ps.

4.And can I manage items (weapons, armor, items, etc.) as key/value of userdata without using the inventory function of the play fab?

Are there any advantages/disadvantages??

(That is, the difference between managing it as an itemInstance through getInventory and managing it as a string through getUserData)

thanks!

playerdata.png (54.7 KiB)
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 answered
  • For #1 and #2:
  • This limit is the update frequency limit. It means that PlayFab will allow a little higher update frequency in a short time, but eventually, you can have at most 1800 updates API calls within one hour. As long as the frequency is under the limit, there won’t be issues.
  • In terms of “Player Update per request”, it means that you can only update 10 KVP via single API call. If there are 20 entries for your Player Data, you will need to separate the data and send 2 API calls for updates.
  • 500 times per minute is exceeding the limit (Is it per user or total?). If it is per user, why will you need such high frequent updates? If you are looking for a real-time syncing data with the server, you will need to implement a hosted multiplayer server: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/. Main service of PlayFab is based on RESTful API, your scenario doesn’t look like a classical storage solution. You won’t need to consider the total updates for the player data, PlayFab is scalable and the limits usually are for per user.
  • #4, Catalog/inventory system is more convenient to manage items. You can manage them in player data theoretically, but the limit of every resource on PlayFab is separate.
10 |1200

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

MoonHeonYoung avatar image
MoonHeonYoung answered

Thank you for answer.

I understood that if less than 1800 calls per hour, data size is not an issue.

1. If so, will there be an additional charge if I exceed the 1800 call limit in one hour?

2. Your answer:

"500 times per minute is exceeding the limit (Is it per user or total?).

If it is per user, why will you need such high frequent updates?"

- I am making a mobile action RPG. So, if the frequency of SAVE(UpdateUserData) is low,

the cheating user will reload after failing to strengthen the item.

My goal is to maintain data integrity through data synchronization as much as possible.

And every time a user kills one monster, 1call,

When you get an item, 1call

1 call when the status value increases by 1

Considering the number of cases in all cases, there can be many calls.

Should I try not to exceed 1800calls as much as possible?

"If you are looking for a real-time syncing data with the server, you will need to implement a hosted multiplayer server "

- Not as much as real time, I want to build data synchronization as high as possible.

However, I know that multiplayer servers are suitable for moba purposes.

And it contains a lot more than I need.

"Main service of PlayFab is based on RESTful API, your scenario doesn’t look like a classical storage solution."

- In my other question in playfabForum, there was a similar answer.

When the user attacked the monster, the question was about the frequency of the call of the function that returns the final value after performing damage calculation in the cloud code.

It was answered that calls with that frequency were possible.

(Maybe, it's about the frequency of executeCloudFuction calls.)

However, the number of times a user attacks a monster will be more than 1800 calls per hour.

Is the number of calls such as executeCloudFuction, not player data, over 1800calls? (limit)

It's lower than the real-time rpg, but I want a similar synchronization, but isn't this scenario suitable for playfabs?

"You won’t need to consider the total updates for the player data, PlayFab is scalable and the limits usually are for per user."

- Does it mean that there is no need to consider it, should the Play Fab be understood as the concept of saving the save data of a single game in an external storage?

Unlike my purpose as follows??

Update the "savedata" key of a player's PlayerData(Title) (which contains all of the client's data) as often as possible

thanks!

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 ·

In any subscription plan, except Enterprise Plan, when 1800 limit is exceeded, the following same API calls will return limit exceeding error.

You may customize it in Enterprise Plan, but this is not a recommended scenario. Your scenario is more like Online RPG (like Diablo3), and RESTful API are not suitable for such high frequency updates. There should be a long time running hosted server to handle the updates.

I believe the main concerns is anti-cheating. I am not sure what is the type of the game, if it is action game, level-based game will be a good choice. We may collect battle logs after the battle is done and analyze data before reward is granted.

If your game can balance the frequency within the update limit, your current implement should work fine. In my point of view, your game reminds me of Diablo3. The most efficient way is via dedicated hosted game servers.

0 Likes 0 ·
MoonHeonYoung avatar image
MoonHeonYoung answered

Yes, similar to Diablo 3, but a shortened mobile rpg. Positions such as coordinates will be handled by Photon. I'm only trying to use the Playfab for functions like save call when I get important data as a result of strengthening an item. As your answer, it seems no problem if I meet the limit of less than 1800 calls in an hour. Is that correct? (Dedicated servers may be the best solution, but I don't have the time to do that, and I want to use a more economical method.)

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.

Seth Du avatar image Seth Du ♦ commented ·

Yes, as long as you keep the frequency below the limit, it should work. Another thing you may note is that RESTful cannot guarantee the 100% success, which means during such frequent updates, there can be failed responses. The client should be able to handle the errors and re-send the update calls. Meanwhile, players shouldn't notice this process because waiting for a proper response every time they kill a monster will be quite annoying. Anyway, if time is permitted, dedicated server may be a better solution.

0 Likes 0 ·
MoonHeonYoung avatar image MoonHeonYoung Seth Du ♦ commented ·

thanks for answer it helped!

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.