Flaw: Negative Capital

At some point late in the game, after I accumulated a bit over $2.1 million BC, all the capital became a debt, all while having positive income. 

2,624 views 5 replies
Reply #1 Top

When a signed 32-bit integer overflowed?  :grin:   +2.1 billion is right around 2^31 ...

Reply #2 Top

time to start a riot because how dare they use a 32bit integer in a 64bit game!

 

and don't tell me it has nothing to do with eachother cause that obviously doesn't matter!

Reply #3 Top

Just encountered this as well. I first thought it to be a display error but nope, seeing I actually get "not enough credits" shown when trying to build a starbase showed me that it's truly a signed int number being used. I recall stumbling over a similar issue when coding for webgame as well. Back then I just tricked the system by using single-precision FP numbers. But that was in 2003!

If it's a true 64 bit application then numbers can be natively computed within the same context without emulations. So I really do not see why they'd stick to signed int32 :/

Even so, there is also the issue of displaying numbers in general. If I recall correctly they had a nice way to display numbers in GC2 where they just noted numbers on main screen as 1T, 1B etc. Here they could display the numbers with official abbreviation i.e. bn for billion. On other screens they just should find a text scaling system which makes them fit nicely on screen like using ellipsises.

Reply #4 Top

Note that IEC/NIST have long ago (2008 :)) disambiguated the SI prefixes. 

K = kilo := 10^3

M = mega := 10^6

G = giga := 10^9

T = tera := 10^12

These are strictly decimal prefixes now.  There is no more ambiguity.

 

New binary prefixes have been created to take over the 2^10 role.

Ki = kibi := 2^10 = 1024

Mi = mibi := 2^20

Gi = gibi := 2^30

Ti = tebi := 2^40

So your flash drives all went to 64 GiB (gibibytes), and your gaming laptops to 8 GiB memory.

 

Hence, GC2's use of T for trillion is (still) correct!  (N.B. Malfador's Space Empires series also did this with pop -- Earth 5B, huge planets 10B, and you could build a ringworld for 100B -- so we all did that)

 

References:

Reply #5 Top

Quoting Gilmoy, reply 4

K = kilo := 10^3
End of Gilmoy's quote

 

Kilo is actually lower case k. It is the exception to the rule of upper case for greater than 10^0.