The International Simutrans Forum

 

Author Topic: River settings  (Read 2209 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
River settings
« on: December 28, 2012, 01:05:46 AM »
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:

Code: [Select]
################################### 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:

Code: [Select]
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.

Offline TygerFish

  • *
  • Posts: 107
Re: River settings
« Reply #1 on: December 28, 2012, 02:19:10 PM »
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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: River settings
« Reply #2 on: December 28, 2012, 02:26:41 PM »
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?

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: River settings
« Reply #3 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: River settings
« Reply #4 on: December 28, 2012, 02:47:31 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?

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: River settings
« Reply #5 on: December 28, 2012, 03:08:38 PM »
Yes!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: River settings
« Reply #6 on: December 28, 2012, 03:15:01 PM »
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.
« Last Edit: December 28, 2012, 03:34:32 PM by jamespetts »