AdVenture Capitalist

AdVenture Capitalist

View Stats:
jajakilroy Jul 28, 2015 @ 10:01pm
How does this game work?
I play with calculators for fun. How did you all make a calculator that works so well. When I try to do some of these calculatiorn many times my calculators will freeze how did you fix this? and get it to do it so quickly.
< >
Showing 1-14 of 14 comments
Demodulated Jul 29, 2015 @ 5:06am 
This game is nothing compared to what a computer can do. Modern CPUs can do over 100 gigaFLOPS.

https://en.wikipedia.org/wiki/FLOPS
Last edited by Demodulated; Jul 29, 2015 @ 5:07am
Himitsu Jul 29, 2015 @ 12:31pm 
Originally posted by Demodulated:
This game is nothing compared to what a computer can do. Modern CPUs can do over 100 gigaFLOPS.

https://en.wikipedia.org/wiki/FLOPS

Unlike my girlfriend, who hates a flop.
cfteague2 Jul 29, 2015 @ 7:34pm 
well, honestly most normal math calculations with large numbers use floating point math, but I don't think they range far enough for this game. I think some of the larger floating point formats top out at 10 to the 177th power or something.

So, as far as I can tell, the authors of this game did have to come up with their own record structure to store enourmous numbers, and then they would need to write their own functions to work.

I'm a little curious, do they store the numbers exactly (ie: even when I have tresextagintillions of dollars, does it remember if the smallest digit is a 1 or a 2 or whatever?

Or do they keep only the most important 10-20 numbers, and figure nobody cares about numbers that are 20 orders of magnitude away? ie - if you have decillions, it might not actually keep track of how many spare trillion you have. cause it's so much lower that it would never matter.

To be honest, I'd make it store exactly, cause I'm OCD. But I think it's likely they didn't bother. I can't think of any way to tell. you'd have to like have just 1 lemonade stand earning you like $1 at a time, and click it like 100 trillion times, and see if it adds up eventually, or not.

I'd test that of course, except my head would explode before I finsihed. which is something I try to avoid.


CyberDown Jul 29, 2015 @ 7:51pm 
i dont know how this game "does it" but i do know that clicker heroes reaches a point where your computer cant handle the number and its basically the end of the game.
Aristos Jul 30, 2015 @ 4:42am 
The normal limit is based on the bitrate (32 or 64) and compiler. Higher adresses cannot be managed by the ram. In c++ for example "long double" is the highest kind of a variable, taking 12bytes.
The trick is to reform the values artificialy. 1.000.000 is can take more adress space than 10e^6. ; higher values could be transfigured in ssth like 10e^6^6. You could also split the numbers but i guess thats less efficient. Never the less a normal calculator cannot do this.
Libarys like GMP can handle this and as coder you dont need to know how. If youre very into maths/programming, you can try to understand this by theyr documentation/sourcecode ( https://gmplib.org/manual/Algorithms.html#Algorithms )
Last edited by Aristos; Jul 30, 2015 @ 4:44am
Nemonical-Yves Jul 30, 2015 @ 12:31pm 
I guess they just use standard 64 bit double precision floating point numbers, just like Clicker Heroes does. That would be enough for numbers far into the uncentillions, just falling short of a duocentillion.
Demodulated Jul 30, 2015 @ 1:13pm 
I love this conversation :)
Aristos Jul 30, 2015 @ 1:32pm 
Originally posted by Nemonical-Yves:
I guess they just use standard 64 bit double precision floating point numbers, just like Clicker Heroes does. That would be enough for numbers far into the uncentillions, just falling short of a duocentillion.

I'm not so much into this anymore (its like 15years ago i was realy coding) but im a bit curious (being at octseptuagintillion actualy btw. but without scientific notation i've no clue if thats more or less than uncentillion). I think this game is like Cl. Heroes 32bit compatible, so how to use 64bit vars?
Pi Jul 30, 2015 @ 1:46pm 
Fun fact #512 : Consoles are also nothing compared to pc's but yet milions of people play them every day!
Siku Jul 30, 2015 @ 3:05pm 
Originally posted by Aristos:
Originally posted by Nemonical-Yves:
I guess they just use standard 64 bit double precision floating point numbers, just like Clicker Heroes does. That would be enough for numbers far into the uncentillions, just falling short of a duocentillion.

I'm not so much into this anymore (its like 15years ago i was realy coding) but im a bit curious (being at octseptuagintillion actualy btw. but without scientific notation i've no clue if thats more or less than uncentillion). I think this game is like Cl. Heroes 32bit compatible, so how to use 64bit vars?

32bit operating systems can use standard 64bit double-precision floating point numbers, but it is a lot more taxing on the processor. Modern CPUs, through newer instruction sets such as AVX / AVX512 can process 2, 4 or even 8 doubles at the same time.

Originally posted by CyberDown:
i dont know how this game "does it" but i do know that clicker heroes reaches a point where your computer cant handle the number and its basically the end of the game.

AdCap most likely has the same limit, which is roughly uncentillion at E+301. A double can go all the way up to E+303 but AdCap contains the concept of pennies. (When you start a a new game, a lemon generate 1.00 and the next one cost something like 4.75, instead of generating 1 and costing 5.), hence the difference between 301 and 303.
Nemonical-Yves Jul 30, 2015 @ 3:16pm 
Originally posted by Aristos:
I think this game is like Cl. Heroes 32bit compatible, so how to use 64bit vars?

32 bit processes have an address space of 4 GB, 64 bit massively more, also more and wider registers plus some other enhancements. But doubles (64 bit floats) can be computed natively and without any problems in 32 bit processes. SSE instructions operate on 128 bit wide registers, AVX even on 256 bit, all in 64 bit processes. The memory model basically just affects pointer types and therefore how much memory can be addressed.

1 million -> 10^(1*3+3) -> 1.0e6
1 billion -> 10^(2*3+3) -> 1.0e9
1 octseptuagintillion -> 78-illion -> 10^(78*3+3) -> 1.0e237
1 uncentillion -> 101-illion -> 10^(101*3+3) -> 1.0e306

A double can go up to 1.79769e308, in other words 179.796 uncentillions.
Aristos Jul 30, 2015 @ 11:19pm 
Thanks for clearing it up ;) As said my time as (low) coder is long ago.. pentium 1 times xD
Schmizzyy Jul 31, 2015 @ 6:01pm 
This is a perfect example of history and our world.
It all starts with a question, then theories, then one firm true answer.
Last edited by Schmizzyy; Jul 31, 2015 @ 6:02pm
jajakilroy Jul 31, 2015 @ 6:28pm 
Ughh... I think you wall broke me!
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Jul 28, 2015 @ 10:01pm
Posts: 14