question

bbekec avatar image
bbekec asked

Simple inventory for a card game

Hello, I m developing an online card game which uses Playfab. I use Playfab to keep player profiles

In the game, players can consume their coins to draw a card. Normally i m using a simple "PlayerPref" to keep coins but i need a cloud inventory instead of it. I just made a research over Playfab catalog system but it is a little confusing and unnecessery for my game. I just need an inventory which keeps coins and when player use his coin, the number of coins reduce one by one.

can Anyone describe me about how to make my system as simple as much please?

(just one click > Reduce one coin from total coins of Playfab cloud inventory)

In addition, I will use Google IAP, and rewarded videos to refill coins to the inventory.

Thanks

Player Dataapis
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

PlayFab provides the virtual currency feature which can implement your demand. Please refer to this doc Currenies for the basic tutorial of PlayFab virtual currency. Each title can support multiple arbitrary virtual currencies. This provides flexibility for your game to implement any medium of exchange you desire (e.g. gold, gems, hearts or interstellar credits). Server API AddUserVirtualCurrency can be used to grant virtual currency to users, and Server API SubtractUserVirtualCurrency can be used to decrement user’s VC. You can use them flexibly in your game. Other API about virtual currency, please search the keyword “Virtual Currency” in API references. About integrating PlayFab VC with Google IAP, you can check this doc Getting started with PlayFab, Unity IAP, and Android to get started.

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.

bbekec avatar image bbekec commented ·

Thank you so much for your help Sarah, I will follow your instructions. Regards.

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.