question

yogev avatar image
yogev asked

How to recharge currency?

Hey, I am building a game like Candy Crush and I have 2 questions,

  1. I use recharge rate to recharge the player hearts but I have another option that they can pay with real money or coins to recharge the hearts I thought to create 5 bundles and each bundle gives a different amount of hearts like 1 -2 -3 - 4 -5 so if they have like 4 hearts they will buy the first bundle with 1 heart is it a good idea? or too much?

  2. on each level they are starting I want to spend 1 heart how should I do it? should I make them buy 1 item and auto-consume it? or use the azure function to remove 1 heart but I feel it could be a bit of a waste of calls.

thank you

In-Game Economy
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

·
Neils Shi avatar image
Neils Shi answered

I use recharge rate to recharge the player hearts but I have another option that they can pay with real money or coins to recharge the hearts I thought to create 5 bundles and each bundle gives a different amount of hearts like 1 -2 -3 - 4 -5 so if they have like 4 hearts they will buy the first bundle with 1 heart is it a good idea? or too much?

Yes, it's a common scenario in games. Players can purchase bundles according to their needs to get the corresponding hearts.

on each level they are starting I want to spend 1 heart how should I do it? should I make them buy 1 item and auto-consume it? or use the azure function to remove 1 heart but I feel it could be a bit of a waste of calls.

I think both approaches work. Clients can spend hearts by calling API PurchaseItem which purchase the consumable item. Or you can call API SubtractUserVirtualCurrency directly to remove the player’s heart via Azure Function. please note that this API can make the VC balance negative, so, you may need to add some check logic to your Azure Function in case the heart is negative.

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.