Hello,
I am creating an little hobby database driven browser based game and I stumbled across this problem: I store money owned by users as an 32bit integer field (to be precise: two fields. One stores money in players hand, the other - money stored in bank). We all know, that maximum value, which can be stored in 32 bits is 2^32-1.
I am absolutelly sure, that 95% of players will not be able to reach the upper limit - but on the other hand (and after doing some calculations today) good players will be able to accumulate that much.
Having that in mind I came with the following ideas:
- store money in 64bits, which doubles space of each record.
- store money as string and convert to/from long long in the runtime.
- change game mechanics so players will not be able to gain that amount of wealth.
I know that existence of reachable upper limit is rather limiting for some players, so for me the third option is worst from the proposed ones.
Are there any other ways of dealing with this kind of problems? Which one would You go for?