News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Better density for small cities on map generation

Started by jamespetts, February 28, 2010, 01:08:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

knightly

@James

The ring-by-ring approach is not without problem. Unlike fields, there may be holes in a ring due to inapplicability of house rules or road rules. A reasonable criteria to determine whether to expand search to the next ring is to see if an exhaustive search in the current ring fails. However, even an exhaustive search is not really exhaustive : rules are only checked if they first pass the chance test (based on their respective chance factor), meaning that some tiles may have applicable rules which are not applied. This leads to premature expansion of search to the next ring, thus losing much of the benefit of this approach.


@Prissi

Quote from: prissi on March 03, 2010, 08:58:04 PM
gb = buildings[buildings.at_weight(simrand(buildings.get_sum_weight()))];

I have tried this approach already, but it ends up with a few very high-level buildings here and there near the centre, and there are some level-one or two buildings at the city centre even for very large cities (as they never have the chance to renovate just because of their low level).

Quote from: prissi on March 03, 2010, 08:58:04 PM
EDIT: But the main point is, if the user feel that the current system produces unnatural towns. In a short test, I had some troubles to spy out the differences for normal standard values.

I don't know if you mean you have tested the original code or my patch. If it is the latter, I want to emphasize once again that the major purpose of my patch is to better enforce renovation_percentage, and while it is not difficult to do, I have not yet included any code in the above patch which deals with the difference between large cities and small towns.