About storing the population, I was thinking that we could do it like this. We could have 1 short int variable for population. That would be 2 bytes per tile. Then, 3 highest order bits would store the magnitude of the number in powers of ten, and 13 lowest order bytes would make up the number. 2^13 = 8192 and 2^3 = 8, so we could get numbers from 1 to 8192 * 10^8 = 819,200,000,000 which should be enough for most purposes. This would be easily done with bitwise operators of c. The problem is, that we get only 4 significant numbers. Would it be enough for tile populations? With 0.07% population growth, we get about 5 people with population of 8192. This system would allow flexible changing of magnitude. Still, it would be difficult to keep track of really small populations, like 1000 people. The growth is simply too little to be significant. But perhaps if we separate birth and death rates? First some people are born, then some people die, and those combined would be the growth rate. This way the percentages would not be so small, and would be easier to keep track of.
Of course another option is to use only 2 bits for the magnitude, so we could get numbers from 1 to 16384 * 10^4 = 163,840,000 which might be enough for tile populations. For region, civ and world populations we could use other systems.
[This message has been edited by amjayee (edited March 20, 2001).]
Of course another option is to use only 2 bits for the magnitude, so we could get numbers from 1 to 16384 * 10^4 = 163,840,000 which might be enough for tile populations. For region, civ and world populations we could use other systems.
[This message has been edited by amjayee (edited March 20, 2001).]

.
Comment