question

Nikola Georgiev avatar image
Nikola Georgiev asked

How to store large amounts of currency (quintillions and more)?

We're working on an idle clicker game. A core feature of the game is an ever increasing economy. New worlds, upgrades, etc always cost times more then the previous ones. Hence users' amount of currency may reach quintillions, sextillions, etc.

Currently PlayFab's currency allows for a uint32 (4,294,967,295 max value). Any advice on the best approach would be appreciated.

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

·
Gosen Gao avatar image
Gosen Gao answered

You can store the currency to the player data as a string and Player read only data will be preferred. Or you can create two virtual currencies, currency one stores the value under4,000,000,000, currency two stores how many times the currency one’s limit are reached. Once currency one reaches 4,000,000,000, you can set currency one to 0 and add 1 to currency two. In this way, you can store quite a large number.

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.