News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

River settings

Started by jamespetts, December 28, 2012, 01:05:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

The river generation code has changed somewhat since the river settings were first set up. We now get rather more rivers than was formerly the case. This is good in itself, but I find that there are very few intermediate class rivers, especially the plain "river", with many streams and wide rivers, and a few small rivers. This is a shame, as it would be interesting to have a greater balance, especially as the different classes will become more distinct in their capabilities in a future version.

A possible solution comes to mind. The current river settings, for reference, are:


################################### River settings ##################################

# rivers:
# The highest number is the smallest. A river with max_speed==0 is not navigavable by ships.
river_type[0] = River3
river_type[1] = River2
river_type[2] = River1
river_type[3] = River0

# The number of rivers
river_number = 128

# river min length
river_min_length = 2

# river max length
river_max_length = 4096


If we change the first part of those settings to:


river_type[0] = River3
river_type[1] = River2
river_type[2] = River2
river_type[3] = River1
river_type[4] = River0


this should ensure that there are more rivers of type 2 (being the simple "river" types), and that "wide rivers" (type 3) appear less frequently: not every river, after all, can be the Humber or the Thames or the Severn.

Any thoughts on this or any other aspect of river calibration would be most welcome.
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.

TygerFish

Quote from: jamespetts on December 28, 2012, 01:05:46 AM
Any thoughts on this or any other aspect of river calibration would be most welcome.
If it works out exactly as that -- with just more River2s -- I think that probably would work better.  That does seem to be a good size of river to be the most common. 

Also, since rivers seem to grow bigger when they merge -- I haven't had a chance to check the actual logic behind that --  we might be able to mitigate river bloat somewhat by increasing the min_length so that at least tributaries take up more room on the map relative to main rivers.  That in turn might lead to a reduction in river_number.

Another possibility, if the river types are unlimited, would be to add new intermediate sizes to match up with our planned new canal types.  That would probably be much more work, but might be worth considering as well.

jamespetts

I did wonder about adding an intermediate size, but I am not sure whether we could sensibly fit in a new size gradation. Indeed, I am not sure how well that my new larger canals will end up working yet, so we shall have to see. Are three navigable river types not enough for now?
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.

kierongreen

More graphics types means more work drawing them, and more difficulty distinguishing between them. If it can be avoided so much the better.

jamespetts

Quote from: kierongreen on December 28, 2012, 02:43:50 PM
More graphics types means more work drawing them, and more difficulty distinguishing between them. If it can be avoided so much the better.

Indeed! Kieron - do you think that my above suggestion in respect of the rivers would work?
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.

kierongreen


jamespetts

#6
Splendid!

I have also realised that I forgot to respond to the first part of Tyger Fish's suggestion, that of increasing the minimum river length. This might indeed be worthwhile, as I only had it at that low level to encourage the generation of a greater number of rivers before Prissi's recent code change improving the number of rivers generated. Any suggestions as to what the new minimum should be?

Edit: Increasing the minimum river length seems to work well, but repeating river2 in the list of rivers does not seem to work: instead, I never get wide rivers at all. A brief look at the code suggests that it should be possible to define up to 10 rivers, so I am not sure what the problem is here. I have not had a chance to look at the code in detail or test it in a debugger, as I am away from home and do not have access to my main computer with my C++ development environment set up.
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.