Active stations can influence town growth: A station is counted if it is within region 0 of the town and the last loading or unloading process of any type is at most 20 * 185 = 3700 ticks, or 50 days ago.If town growth is funded, these checks are ignored and the town always grows. If town growth is not funded and the town needs water, food or whatever (and has population>90 for subarctic, population>60 for subtropic), it does not grow at all. First, the game checks whether town can grow at all.This number is updated frequently, with the following algorithm: In the former case, the town tries to build a new house every x days. Town growth speed is always "once per x days" or "does not grow". The tile with street lights is (19,9) tiles away, the squared distance is 19^2+9^2=442 which is smaller than 443. If half of the town tiles can be used for houses, the whole town can be within this area.Īn example with a town in PSG218: It has 1171 houses, therefore m=146 and region 4 has range=146*3+5=443. Region 3 has an area of about pi*5/8*housenumber tiles, which is nearly 2*housenumber. Towns with less than 92 houses use a table to look up the size of these regions, if they have more houses they use the following formulas:Ī tile is within a certain area if its squared distance to the town center is smaller than this range. Towns have four different areas, which can be distinguished by the road layout: The central structure is disconnected to enforce town growth in the direction of the long road. The map shows a single road, 4135 tiles long, with houses on both sides. This town demonstrates the large difference between potential growth radius and usual town sizes. This is fine, as the town radius grows with the square root of the house number, too, if it can grow in all directions. I don't want to annoy you with details, but it is important to keep in mind that the resulting path might visit the same roads multiple times and the average distance from the origin grows with the square root of the pathlength. This leads to a pattern which is called random walk in mathematics. Where does the difference come from? As mentioned in step 3, the town follows roads in random directions at each crossroads. But it fits in a circle with a radius of about 50 tiles. If a bridge begins at the tile of the city center, the other side is used only half of the time.įor interpretation, it is important to compare N to typical town sizes: A town with 200,000 inhabitants might have something like 2000 houses and therefore N=230 to 900, depending on the road layout of the town. If the algorithm hits a bridge (or tunnel) instead of a regular road, it continues at the other side, independent of the length of the bridge. Repeat steps 3 and 4, until the number of attempts is larger than the maximal number calculated in step 1. If the road has a connection to one side only (and therefore is a dead end), the function is stopped.Ĥ) Try to build something there again. At cross-roads, a random direction is chosen. For regular roads, this just follows the road. ģ) If the function was not stopped for one of the reasons above, follow the road in a random direction, except the one where you came from.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |