Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

The variables I'm using are double floating points, which have two parts: The significand, which is the number itself, and the exponent, which is the magnitude it's raised to, be it incredibly large or incredibly small. Precision is lost in incredibly large numbers, but that's not important in this kind of game.

However, a double floating point has a maximum value of around 1.78e308, or 178000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. This is, for most purposes, large enough.

However, for incremental games and/or big titty fox games where an upper limit simply isn't a thing, it's a wall. Attempting to create a number above that limit will create "infinity" a value in javascript that can be used for some things, but there are places it breaks.

Specifically, the SVG code I plug the number into. That's not strictly javascript, and it has no handlers for infinity, so when I try to plug a string into a few 40 or 50 places where it expects a number, it throws an error, every frame. It also does not render the fox. So, I limit the volume at 1e300 or so (and in doing so, limit the length at 1e100).

There are a few solutions, but the best one by far is Break_Infinity.js, used by the Antimatter Dimensions incremental game to create some silly huge numbers by storing the exponent and significand in two separate floating points, allowing them to effectively raise the limit to 1e308e308. It's important to note that with those kinds of numbers, you can't just use javascript's inbuilt operators, they're not designed for that. You have to instead use custom operators, which can be troublesome, and even that doesn't solve the main problem:

You wouldn't be able to plug the numbers larger than 1e308 into the svg display. They'd have to be truncated or shrunk, but regardless, at that point nothing is being accomplished. The visual change is less than a millionth of a pixel.

What makes my games cute is the stories in them, because they paint to life the big titty foxes and make them more than just objects or placeholders. When you start to care, everything starts to matter just a little bit more- especially the booba.

1e308 inches is the diameter of the universe to the power of 11. That's plenty enough to tell a story, I think.

(+2)

Alternatively, when the size number approaches the upper limit, store the result in a string of characters instead of the numeric memory type. For example, you used prefixes for the word "meter". A numeric variable can go from 0 to 999.9, then changing the prefixes or adding new ones. Or by adding zeros at the end, as you did in the previous game. You can do the same with graphics, that is, you can separate the rendering from the values, simulating the growth rate based on actual numerical variables, while text variables carry information about the degree of enormity of the size.

None of that changes the fact that it'll take several more stages of calculation to accomplish. If you think it'll be simple, you're free to try it out on the download there, but I'm satisfied with this game.

(+2)

I agree, since I wrote a calculator for such numbers in C++. I won't force you to make decisions, I'm sorry if I sounded disrespectful.