News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[BUG]: Rivers are cut short due to coastal erosion logic

Started by freddyhayward, December 19, 2019, 08:53:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freddyhayward

My patch can be found here: https://github.com/jamespetts/simutrans-extended/pull/122
River generation is effectively broken as it starts from the coast upwards, and tries to lower the terrain causing two issues:
1. undesirable coastal erosion
2. failed attempts to lower terrain 2 tiles above sea-level which aborts the river generation.
My patch circumvents these issues simply by disabling the coastal erosion check during river generation by adding an extra parameter to the terraforming functions. Results can be viewed below.

jamespetts

Thank you for this. I am not familiar with the river generation logic, as this remains unchanged from Standard (and I wonder whether this might be considered as a patch for Standard as a result).

There are two separate issues here: the coastal erosion and the failures to generate rivers at certain points owing to the inability to lower tiles. I do not think the coastal erosion is undesirable: it effectively creates tidal parts of rivers from narrow strips of sea tiles, which is entirely realistic and desirable. (Ideally, the terrain generator would go even further than this and create wider estuaries and even river deltas, but that is a whole other thing to explore in the future). However, the failure to generate rivers at all in some cases owing to the check failures does need addressing. I wonder whether there is a way to fix this latter issue without removing the propensity to create tidal estuaries?
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.

freddyhayward

Quote from: jamespetts on December 24, 2019, 01:46:52 PM
I wonder whether there is a way to fix this latter issue without removing the propensity to create tidal estuaries?
There is, and thankfully much simpler than the original patch. I have created a new pull request that does this simply by passing the keep_water parameter. While there are clearly still issues with river generation, this should at least allow for functioning rivers in the meantime.

jamespetts

Excellent, thank you very much. This seems to work well, so I have incorporated it. Merry Christmas!
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.