question

Thomas Brown avatar image
Thomas Brown asked

Storing purchasable levels as items or as kvp player read only title data?

So i'll start off by giving a little more context about my game. Currently I have two ways of acquiring levels in the game. The first way requires the user to watch 1 (or more) ads and then the level will be unlocked. The second way is if the player purchases the game all the levels will be unlocked.

I have gone back and forth quite a bit about the best way to handle retaining level purchase data on the PlayFab side. The two best suited scenarios seem to be the following. The first is storing each level as an item and having said item be purchased when the video ad is completed (using PlayFab rewardedAds) for the player. The second is setting a key value pair for each level on the player read only title data for the level the player watched the video ad for. For example "Smith":"Unlocked","Natalie":"Unlocked" so on and so forth.

No matter how I store the levels it seems the obvious solution for the game unlock is creating an item that would be added to the users inventory. Item would be something like "Game Unlocked" item.

As for the individual levels I was mostly leaning toward readonly player data but I started thinking it could be nice to have the ability to bundle up the levels / create stores for them at a later point.

Any thoughts benefits / disadvantages about each approach would be super helpful as well as your recommendation given my scenario would be awesome.

Thanks so much in advance!

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

·
Sarah Zhang avatar image
Sarah Zhang answered

According to your descriptions, we would suggest you use Catalog items to make the tokens or redeeming vouchers for the purchasable levels. And for the unlockable levels that can be unlocked by tokens or watching Ads, we suggest storing them as Player Read-Only Data's K/V pairs.

Catalog items should be provided when making the purchasing via PlayFab API. So you need to use Catalog items to make the tokens, which can redeem a chance to unlock the level. If you want players can purchase the levels directly, you can hide this type of item on clients, forbidden users consuming it via Client API, only use CloudScript to handle the process of revoking the item and unlock the corresponding levels.

If you want to unlock a specific level by watching Ads. You need to separate the processes of giving rewards and unlocking the levels. For example, when players complete an ad watching, you can provide a redeeming voucher for them as a reward. Then when they use this chance to unlock the level, let CloudScript revoke the item and unlock the corresponding levels.

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.