Our spiral needs to have at least 9 available building tiles for each tile from the center. (note, this is for 2x2 and 3x3 grid layouts, other layouts may search for far longer). Since _grow_town_result = 10 + t->cache.num_houses * 1 / 9 The optimum town growth is reached by building in a forking tree or spiral pattern, with no loops (ways to move in a circle) at all. Without all the intersections and dead ends, it would grow orders of magnitude faster.Ĭreate less intersections and loops in your road system to prevent this. In 320 attempts, this town managed to build 18 buildings. Notice how the random nature of the movement caused the algorithm to loop in on itself and not find a spot to place a house, even though close-to-center of town spots next to a road exist.Ī town with a lot of intersections thus will eventually get dead space next to roads that takes a long time to fill in, simply because the random routes the placement algorithm takes just happen to miss these empty spaces. I ran a town on it for a while (it's a really accurate model of openttd's algorithm, pre-1.9) Here's a result of one of my experiments. Try experimenting here with the game's town growth algorithm. As this is the maximum growth speed, it stands to reason that occasional failures to find a spot to build have a much larger effect on the growth speed of bigger towns, as for a big town a 50% failure rate is a 50% reduction in growth speed, while for a town that grows once every say 30 days a 50% failure rate results in only about a 3% reduction in growth speed. If it walks around for a long time without finding a location (the total time it attempts to search depends on the size of the town, longer towns will explore for longer) or it runs into a dead end, it will stop (fail) and execute again in 70 ticks. this is usually the case due to 2x1 or 2x2 buildings taking up such a tile, but the game won't explicitly select such bulidings to fill the tiles, it merely happens due to coincidence. You may sometimes see spaces not adjacent to a road built up by a town. So the house placement algorithm will never find them, and they will remain empty. Some of those empty spots you note aren't adjacent to a road. Since version 1.9 it will also check diagonal tiles (build houses on corners). The function will then, at each intersection, make a random choice where to go, with each single tile walked it will try out an additional random tile next to the current road tile to build a house. If the tile picked is already occupied by a building or road, it will go explore along the road. ![]() It starts at the town's seed tile, directly located under the town name. The game will execute a 'walking' function that will follow the roads of the town by randomly picking an adjacent tile with each iteration. In order to understand what's happening, you need a more detailed understanding of the game's housing placement algorithm (see fn. Have you queried the empty tiles to make sure they're actually empty (and not just parks)? Iff so, proceed: Some of these do cause pavement to appear, but not all. Some buildings (parks, fountains, etc.) have no foundations at all. If you notice any bugs or have some suggestion feel free to post them on our forum.You appear to have 'Hide buildings' turned on. ![]() In case you wonder what do all that creepy abbreviations mean read this: Advanced town growth. Layout needs to be saved for this and not be private. You can make a permanent link to a layout like this: (replace 2 with layout id that you can see in layout list). Press l key for old string layout loader, b key for experimental benchmark tool. ![]() Yellow line - path that was used to find spot for last house, yellow rectangle on tile - CS outline, red one - HR.Ĭolored backgrounds on tiles - town zones from outskirts(green) to red(center). Green border on house tile means new house, dark yellow - replaced house, red - removed house. ![]() Step length "house" means one town growing cycle (70 ticks), not actaly built house (can be CS). It affects town growth even if current layout is completely different. Initial town layout is one that was used to generate town. Town is always growing at max speed (GR1), climate - temperate, year - 1990 Unlike OpenTTD roads are built precisely, so it does matter which part of tile to click.Ĭheck road symmetry in "more options" section if you want to build symmetric layout.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |