News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

City growth in pak128brit 0.9.2

Started by Moe Ron, July 24, 2016, 05:14:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Moe Ron

I seem to be hitting a wall when it comes to the development of cities in the dev build. Cities appear to grow outward and sprawl much less than the current 0.9.1, and toying with cityrules.tab doesn't seem to prevent a large city or capital from reaching Hong Kong or Tokyo density quickly. If not present in cityrules, is there a value to change that dictates the maximum city size in km, rather than population?

jamespetts

There are two parameters in cityrules.tab that affect this:


# chance for renovation versus new building (bigger number => less sprawling)
# Note: the rougher the desired landscape, the lower that this number should be.
#
# With low minimum_building_density, must raise renovation_percentage to avoid sprawl
renovation_percentage = 33

# cities will not grow further along existing roads, if the buildings density is lower (in percent)
# It's surprisingly easy to get stuck at 21 with "poorly located" cities full of geographical obstacles
minimum_building_density = 20


However, note that changing cityrules.tab will only apply to a new game created after the change: the settings are saved with the saved games to make sure that multi-player games run in precise synchronisation.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Moe Ron

#2
Ah, I now see the issue in that the save game I had was using the default parameters, even though I was changing the values. Thanks.

I've also notice that buildings are no longer bound to cities, allowing us to build freely. Is there no longer a way to grow or shape cities manually?

jamespetts

May I ask what you mean when you refer to buildings no longer being bound to cities?

Cities can be grown manually in the sense that you can disable city growth (in the information dialogue for each city) and place buildings manually using the public player; is this what you meant?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Moe Ron

In 0.9.1, placing a building as the public player would extend the nearest city's limits out to that building, but in this newer version, buildings can be freely placed without being bound to a city. My issue is that cities can no longer be influenced in growth, and the amorphous shapes of cities have been reduced to rectangles.

jamespetts

They should not be rectangles if minimum_building_density is set to an appropriate level. I should note, however, that the city building code has not been significantly altered from Standard, although this is planned for one day, and the Standard code has itself changed since 0.9.1 (and those changes have recently been incorporated into Experimental).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Moe Ron

I'm fumbling about in the dark with all the new features of 0.9.2. What would an appropriate value be for minimum_building_density? I've already set it to 10 and decreased renovation_percentage to 30.

jamespetts

I have to say, I have not tested this yet; have you found that the default values produce rectangles? If you do find some good values, please let me know!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Look at the test server game. The city of Trnava is almost square in shape. It was grown using the default settings and city growth tool (as public player) and has grown a bit by itself since then.

Moe Ron

Quote from: jamespetts on July 30, 2016, 08:58:20 PM
I have to say, I have not tested this yet; have you found that the default values produce rectangles? If you do find some good values, please let me know!

Every single value I've used has produced rectangular city limits that won't overlap eachother at all.

jamespetts

#10
Hmm, this is odd, as I do not think that I have changed the code for how cities are built from Standard. Does anyone know whether this is or has been in the past an issue for Standard?

Edit: Looking at this in more detail, this seems to be down to changes made by Neroden to Experimental in July 2013 (Github IDs 7c97e42e68144e72d4fdf6607924516e8d9523bf and c1f77a11d4e0cb9a61343ead15e0d37c1bafa579). Given that square cities are not game-breaking, and do not affect the balance in a significant way, and given that this issue is likely to take a lot of work to fix, this will have to wait until the re-design of city growth in a release after the next to be re-designed.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.