Unity Newbie Incremental Game Help

Disclaimer: I’m new here, I don’t know if I’m even posting this in the right place. If there is an admin that could move this thread to the right place, I would be happy.

Hi there, folks. I’m very new to development with Unity, and I was creating an incremental tap game. I’ve got most of the basic code written and working, but I’ve noticed that once I reach a certain number, it will switch my numbers to negative and completely mess the game up. I was wondering if anyone has had this problem, and if so, is there a way to fix it? I would really like to use Unity to make this game but if the engine can’t handle large numbers then I don’t know what to do.

I found out that by using number conversions (1,000 to 1k and so on) that it lets me go a little further, but I still hit a limit. I would like to be able to count much higher. If you want an example of a game that counts really high, check out “Will It Crush” or “Knife Flipper” or “Idle Balls” all published by Voodoo. I know that I can submit my game directly to them, but I kind of want to develop this game on my own.

Any help would be greatly appreciated.

If you’re storing the value as an int or a float, those have a limit. Ints, for example, go up to a little over 2 billion. If you keep adding to an int after this point, it will “overflow” to about negative 2 billion.

For incremental games, you quickly pass the “billions”, and deal with massive numbers. You’ll need a different way to store the values. One approach is BigInteger:

1 Like

Thank you SO much. If you want, I can put your name in the credits.