Okay, I've played the map for 20 game years or so and have a couple observations.
First it seems that intial town growth is mainly a "boom" sort of growth.
For example, I have a town with my bus stops for 5 years, without buses. Sure it grows by a dozen or so, but nothing major. Now, I put my buses to work and the town responds quickly. Going up rapidly in the first couple years. This seems to take place because of building changes mostly.
Now after that initial boost things seem to drop a bit. During this decline the growth actually includes new houses (the building block). I've had towns go from 400 to 1300 back down to 600 in a matter of 10 years. With this sort of "growth" it is very difficult to keep goods going to that city.
Now I've combed through the code and found that the "radius" of the city is also vital to growth. And the radii isn't always increased. More analysis will be needed.
Another suspect I have deals with water. I have one city "watertown" that I initally surrounded by sunken land, and the city refused to build on this land, and even when I "break the dam" and let the water in, growth seems to be hindered. This may have something to do with the radius of the town, but I'm not sure. I finally gave in and leveled the land to the top left of the city hoping to promote growth as the town has shrunk drastically for some reason.
Yet another key item are roads. Once I start bus service I try to lay the town out to allow growth, this seems to help. Placing no roads makes the engine build roads in odd places and housing in odd places as well.
Finally pathfinding. It seems if you watch the buses in a city going between two stations long enough, a bus will go "around the block" and delay servicing. This seems to be due to bad pathfinding, as it gets "lost" or it thinks going around the block is faster than across the street.
Even after 20+ years of constant servicing, none of my cities are above 2k people. I've been waiting to see how I've seen cities in the 10,000's or even 100,000's on some screenshots. Growth must be exponential once you hit a critical number of houses; as shown by the formula:
Code: Select all
t->growth_rate = m / (t->num_houses / 50 + 1);
in [i]UpdateTownGrowRate()[/i]
Where t is the town, and m is the growth counter. The max 'm' is 210, so if a city has 10 houses then the growth rate is 210 / (10/50+1) = 175
Now my request of Building houses could be accomplished like so:
Pseudocode style
Code: Select all
int numHouses = 0;
int numHousesAdded = 0;
numHouses = rand()%10+1; // 1 to 10 houses
while (numHousesAdded < numHouses)
{
while (!AddHouseToTown(Town *t))
{
numHousesAdded++;
}
}
HouseAddToTown() is a procedure to search and build a house to the town, returns false if the search couldn't find a suitable place for a house.
Now to avoid an infinite loop, the existing proceedures should be used to extend roads or build bridges and expand the radii of the city. Obviously the code above isn't complete.
My suggestion to really boost city growth is to include *all* buildings in calculations, not just houses.
Save game attached.
[/code]