Can i have number higher than 2147483647?

Hello,

i may have hit a stupid problem because i am stuck cause of 2147483647 int32 max value

how i can do some maths with number larger than 2147483647 ?

lets say i have a monster with 500 000 000 000 health

i want to hurt him for 50 000 damage! i can use 50 000 in a int, but i cant store 500 000 000 000 (i may store it in a string, but i cant do string - int )

i feel stupid right now because i am totally stuck with no idea

uhm float :slight_smile: goes to 3.4E+38 … wait actually thats still too small with only 340 000 000 000 i think

However you should keep in mind that big numbers = not necessary for the actual code.

lets say in code your player does 500 damage you could easily when you want to display this damage (for big numbers like in diablo to impress people) show them a multiplied value, the code is the same.

A good example for this is percentages, its usual to use 0 - 1 for 0 - 100%

1 Like