AI keeps cities with size 1

I think you know this, but 31 = 11111 in binary, which is a bizarre breakup of memory.
255 is 11111111, which makes much more sense, since that is a full byte.
If the Civ coders wrote the cities into an array, then this limit for cities makes sense, and has a natural limit.
I am betting he can push beyond 31 civ's, but 255 cities might be impossible.

The city limit is 512, the "improvement & wonder" limit is 256.
 
The city limit is 512, the "improvement & wonder" limit is 256.

512 is another bizarro number, as is 32.
Sure, it is easy in binary, and asuming they start any array (or whatever data structure) they used at 0, you can count to 32 in 5 bits.
You can count to 256 in 8 bits, (1 byte).
But 512?? That is 9 bits, assuming you start at 0.
Both 9 bits and 5 bits to allocate as counters seems strange.

Then again, I guess I should not care what Firaxis did.
If Skyer really can break the code, he will find these limits.
 
Back
Top Bottom