question

chrissimon avatar image
chrissimon asked

Will Virtual currency limit be increased?

Hi,
My virtual currency has exceeded the Int32 limit. Is there any way to increase it? From certain questions on the forum, Ive seen that you were planning to increase it to Int64. Will that be coming soon?

limits
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

·
brendan avatar image
brendan answered

Can you point me to the answers you're referring to? As far as I'm aware, we've consistently stated that the existing system is the way it is due to our need to support a wide range of programming languages and platforms - some of which do not support 64-bit Integers. That's why both VC and statistics are 32 bit. What specifically is your scenario, however? We have tons of games that use big-int libraries and store stats that appear to the user to be far larger than 32 bit (or even 64) - they just use techniques that "compress" the values.

7 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.

chrissimon avatar image chrissimon commented ·

Hi Brenden,
Thank you for clarifying. The post i was referring to was
https://community.playfab.com/questions/6017/my-statistic-exceed-int32-value-limit.html

The requirement is similar. VC of players are exceeding the limit. Wanted a method to store higher values. Will look into techniques that "compress" the values. :)

Also, can compression libraries be used in cloud scripts?

0 Likes 0 ·
Andy avatar image Andy ♦♦ chrissimon commented ·

Our plans regarding 64-bit stats and currency still haven't changed. Fortunately, it's pretty easy to work around that limitation in a way that works across all potential platforms.

For virtual currency, one of the easiest alternatives would be to introduce a more valuable VC that players could acquire through a trade-in. You could even force this trade-in through a scheduled task that executes cloud script.

Beyond that, depending on the currency granularity you still need, you could also reduce all VC balances and costs by 1 or 2 orders of magnitude. The right choice is going to depend on your game.

0 Likes 0 ·
kaushikbhatt avatar image kaushikbhatt Andy ♦♦ commented ·

Why isnt it possible to make the int32 unsigned? That way you wont not need to deprecate any platform and the limitation would be pushed by twice?

0 Likes 0 ·
Show more comments
kaushikbhatt avatar image kaushikbhatt commented ·

So you mean that we could potentially post values higher that in32 limit? will it not fail? not sure if PF stores values beyong int32 MAX val.... Our VC had already touched the limit and any further additional to the balance did not change the value; by guess is it just throws a error and drops the call.

0 Likes 0 ·
brendan avatar image brendan kaushikbhatt commented ·

No, what I said was that you could interpret the Int32 values returned as unsigned if you wanted to, but they will be interpreted as Int32 for purposes of ordering the leaderboards on our side, as doing otherwise would break every title in our service using leaderboards.

If you want to use higher values, I would recommend using a "large integer" library that compresses the value into a 32 bit space.

0 Likes 0 ·
kaushikbhatt avatar image kaushikbhatt brendan commented ·

cool.. thanks... sorry i got a bit confused

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.