News:

Want to praise Simutrans?
Your feedback is important for us ;D.

bug "cannot terraform in deep water"

Started by dschr, September 30, 2014, 12:00:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dschr

Hello,

i recently had a bug where i could terraform a tile downwards, but since it reached a lower level, it was no longer permitted to terraform it upwards again, showing the message "cannot terraform in deep water". It is inconsistent that i can terraform land to water, but not reverse.
A savegame may will clear the situation, but since i can only attach files smaller or equal to 64kb, i can't attach it here. May you want to write me a (personal) reply with your e-mail adress so that i can send it to you by mail.

Sarlock

The inability to terraform deep water is intended, but you highlight an issue that should be addressed in that if you cannot raise the land at that level, you shouldn't be able to lower it to that level either.  If you are terraforming an area and accidentally lower it too far, you're stuck and cannot reverse your mistake.
Current projects: Pak128 Trees, blender graphics

jamespetts

This is not strictly a bug, but Sarlock is right that this is not ideal. The best solution, I think, would be to prohibit lowering a tile that is already below sea level. I will have to look into that when I have moved into my new house.
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.

pwhk

Apparently, I can lower some land to water to make an artificial river, largely replacing the need of canals  :D

I guess just forbid lowering land that will result in creating water tiles I think?

jamespetts

Quote from: pwhk on October 06, 2014, 02:50:30 PM
Apparently, I can lower some land to water to make an artificial river, largely replacing the need of canals  :D

I guess just forbid lowering land that will result in creating water tiles I think?

There is no reason in principle not to allow that sort of channel, as a sea level canal might realistically be created on occasion: the economics of it are not imbalanced apropos the capital cost if the cost of lowering land to sea level is greater than the cost of the greatest canal. The trouble is in the maintenance cost: quite how to deal with that is a difficult issue, although it should be less pressing once the pakset is rebalanced to increase capital cost as against maintenance cost considerably.
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.

Junna



This is really dumb and should be fixed. Why cannot tunnel change depth if they are far under ground? If this is intentional, there must be an option to disable this silliness.

jamespetts

Hmm - I had not spotted this as an issue nor considered this particular implication. Thank you for pointing it out. Do tunnels under deep water actually have significant changes of level in real life, I wonder? I suppose that having tunnels cross each other would be difficult without permitting this; but do tunnels under deep water cross each other in real life?

If this should be altered, how, I wonder, might this be achieved? Currently, the system is fairly simple, in that it checks whenever the player attempts to terraform to see whether the tile or any surrounding tile is in deep water, and refuses to do so if it is and the player is not a public player. Is there any satisfactory way, I wonder, of detecting something that is already an undersea tunnel?
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.

DrSuperGood

In real life tunnels do exist on sea floors. They are quite revolutionary in that they are assembled in sections above ground, welded shut and sunk into position. Then once joined they are un-welded open into a single continuous water proof tunnel under the sea at the floor. Often sand or gravel is deposited on them for extra protection from hazards like shipping. This technology is in common use in places like China as running a tunnel on the sea floor is a lot cheaper than having to drill a tunnel through rock and as long as it clears all shipping traffic is probably as safe.

Mechanically the checks performed should look at the layers nearby. Terraforming under ground is not allowed by default (this is to stop land rises). Terraforming tunnels will change the path elevation only if the tile above or below is clear. Tunnels count water as clear as long as it is 1 (2 double height) steps below the surface and directly above (1 step) the sea floor. Above sea level terraforming will only allow you to raise a fixed number of elevations above the surrounding (only shallow water). This logic will probably need to be iterative and check multiple layers for objects and information however the finite scope should mean it is performance is alright.

Junna

I know that the Sweden/Denmark Fixed Link, has a tunnel which rises and falls rather steeply during it's deep level crossing. This is also a tunnel sunken into the sea floor as opposed to drilled through rock, as supergood suggested above.

Sarlock

Most undersea tunnels have a significant grade on either end, simply due to the fact that they enter at sea level and then descend to whatever level the tunnel crosses at, then ascends back to sea level on the other side.  Some tunnels go several hundred feet below sea level, and obviously most of this grade change happens under the ocean.
Current projects: Pak128 Trees, blender graphics

prissi


jamespetts

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.

Junna

Thus, if tile is tunnel allow lowering/raising regardless of water level above. Not even the public player has permission to lower/raise tunnel tile if there's deep water above it at present.

jamespetts

I have just been looking into this. The situation is rather different in 11.35 than in the current way-improvements branch, as the deep water prohibition is handled very differently there so as to fit in with the half heights system. I have spent some time cleaning up the code and applying some minor fixes (just pushed). In way-improvements, changing height in a tunnel is permitted, but there seems to be an unrelated bug preventing a tunnel from being extended beyond an upward facing slope (although this can be worked around by connecting to it from the other end so that it is a downward facing slope on connexion).
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

I think the bug preventing extension of upward facing slopes was fixed in standard a while back.

jamespetts

#15
Quote from: kierongreen on November 29, 2014, 11:59:55 PM
I think the bug preventing extension of upward facing slopes was fixed in standard a while back.

You don't happen to know the date or Git commit, do you?

Edit: I managed, with some help from the Standard developers, to locate this fix in Standard and apply it to the way-improvements branch.
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.