News:

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

Tall bridges, issues

Started by AP, January 14, 2018, 02:33:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AP


A couple of issues with "tall bridges" (i.e. 2 altitude levels clearance over the river/ etc below) have come to my attention.
Since the introduction of half-height slopes, there does not seem to be a way (or a graphic?) to build a "tall bridge" which has gentle or half-slope approach ramps.  The approach ramps would each be 2 tiles long in this configuration.This seems a normal and sensible thing to want, because rail vehicles, road vehicles, and tall ships, insist on "tall bridges" - although some canal boats do not. And  horse and steam drawn carriages and trains are both adverse to steep gradients.  It is massively more expensive to undertake earthwork engineering than build a bridge, and yet at present earthworks are the only way to get a suitable "long ramp"  - which makes bridges either very inconvenient or very cost unbalanced.

Separately, it does seem slightly odd that ships with masts dozens of metres high, insist on the same bridge clearance as a railway carriage. Possibly we need a "very tall bridge" category with 5 or 6 levels clearance to better serve this function. The Menai Straits' Britannia Bridge and the Royal Albert Bridge at Saltash both had their clearances dictated by the admiralty and are much higher than a simple road bridge (apparently 31.6 metres and30 metres respectively, compared to around 5 metres for a rail bridge)  There has been a discussion of canal bridges which equates a level change to just a couple of metres or so, so there is a need to be consistent here. A bridge which sailing ships can pass under should appear as a significant thing indeed.

jamespetts

There are two separate issues here. Firstly, the implementation of bridges and heights and their relation with one another is the same in Extended as in Standard, so what you request in the first paragraph applies equally to the Standard code. It would be a huge undertaking for me to make that sort of change, as I do not know much about the inner workings of the code, so, if I were to do it, it is likely to be very many years before this has a higher priority than other tasks.

As to the second paragraph, this is a very complex issue. Firstly, there is not a consistent scale relating to height (and it is difficult to create a consistent scale because of the restriction in the different possible degrees of height). This means, in turn, that Secondly, there is a very straightforward way of building a double height bridge, by holding down CTRL when building a bridge. There is no equivalent for bridges of greater height. Thirdly, it would be extraordinarily difficult to communicate in a clear and consistent way to the player precisely what height of bridge is required for which vehicle. Finally, there are already difficulties with towns building low bridges over rivers, which I plan to address when I have time. It is very unclear how such a solution could work if there were an unbounded range of different heights required for different vehicles. In reality, of course, towns often build bridges over rivers too low for tall sailing ships to pass under them - but not too low for small sailing barges to pass under them (a Thames sailing barge, but not a tea clipper, can pass under London Bridge, for instance).
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.

AP

I'm aware of the CTRL key being available to force certain bridgebuilding behaviour. However it does not offer all the possible permutations of bridges heights / gradients of slope one might expect. I've found an number of permutations where it "refused" to build the required bridge (or part bridge).

For example, when a railway is in cutting 1 level deep, a road bridge across must ascend +1 from a descending -1 slope. A basic combination yet it will not build.  It will only build a slope off a flat tile - sometimes there isn't space for that, and on balancing why pay £5000 to level the tile?

Is it worth moving this to a Standard forum, since it's not a Simutrans-EX issue?

jamespetts

Yes, it might well be. I will put it in extension requests. All of these things are common with Standard.
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.

Leartin

Sounds familiar, like a discussion held many times, even while half-heights were still being worked on:

Quote from: Ters on June 23, 2013, 08:59:18 AMHow about slope going down, but bridge going up?
Quote from: kierongreen on June 23, 2013, 09:40:16 PMPossible in theory but it would add even more graphics...

Same thread already mentions two-tile bridge ramps and two-tile tunnel portals. IIRC, in later discussions two-tile bridge slopes were somewhat denied due to complexity, while the only arguement against slope-ramps was the many graphics one would need.
Bridges in the past had 12 images, with half-height they already have 20 images, if slope-ramps were fully utilized, that would be another 16 images for a total of 36. Potential Images, though, since with bridges you only need the images where you want the bridge to be able to be placed.

I suppose it wouldn't even be that much work for the artist, given that you can just combine the existing ramps and starts into one graphic. Or actually - if this was implemented by anyone, please make it so the lower part (from slope to flat) and the upper part (from flat to ramp) are destinct images. This simply because a double-height ramp on a double-height slope is guaranteed to not fit the normal pak size, splitting it up might spare the hassle of different paking size, plus you could reuse the normal ramps for the upper part and a common foundation for several bridges in the lower part.



Ters

Quote from: Leartin on January 15, 2018, 05:46:27 AM
Or actually - if this was implemented by anyone, please make it so the lower part (from slope to flat) and the upper part (from flat to ramp) are destinct images. This simply because a double-height ramp on a double-height slope is guaranteed to not fit the normal pak size, splitting it up might spare the hassle of different paking size, plus you could reuse the normal ramps for the upper part and a common foundation for several bridges in the lower part.

I don't think that is realistic for compatibility reasons. The game would have to support both the old-style ramps and the new composite ramps, making something already deemed complex more complex.

Leartin

Quote from: Ters on January 15, 2018, 07:08:00 AM
I don't think that is realistic for compatibility reasons. The game would have to support both the old-style ramps and the new composite ramps, making something already deemed complex more complex.
This is about ramps on slopes, which are not supported at all at the moment, so there is nothing to be compatible with, just something completely new.

Ters

Quote from: Leartin on January 15, 2018, 07:21:10 AM
This is about ramps on slopes, which are not supported at all at the moment, so there is nothing to be compatible with, just something completely new.
I thought you wanted to separate the surface layer of the ramp from the supports/foundation, but I see now that maybe you suggest having two support/foundation levels, the upper of which also contains the surface.

Leartin

Quote from: Ters on January 15, 2018, 05:00:16 PM
I thought you wanted to separate the surface layer of the ramp from the supports/foundation, but I see now that maybe you suggest having two support/foundation levels, the upper of which also contains the surface.

Now I'm confused, so I'll use pictures.


start1, start2, ramp1 and ramp2 are what we already have, with start2 and ramp2 being optional.
My proposal is to add "slope-ramp" and "slope-foundation" (for lack of better words) as two seperate graphics which together become the start of a bridge on a slope, all of them optional (since the most wanted version would be "11", while "22" seems rather silly)

AP

Those graphics are cool. :)

They all seem the same width though, so exclude "two tile bridge slopes". Do two-tiled-bridge-slopes need to be a single entity?

If not, you'd only need to add one more component to those drawn  (imagine a right angled triangle on top of horizontal rectangle), to be used in combination with Ramp1 , to enable the same end result? 

Ters

Maybe ramp1, or just sloperamp1, doesn't look good next to anything but the bridge.

As for two-tiled ramps, one would have to figure out how to select the height to build. If you just want to go over a bit of backwater from land at the same height, going up two levels would be a bit overkill. On the other hand, going up two levels should be default, or new players would get very confused as to how to build a bridge over another road. Perhaps some modifier to build the lower bridge, unless length is less than 5. Isn't there already some modifier for choosing whether to go up one or two levels if the bridge supports both height of ramps? Can we assume no bridge will support going up one and two levels in one tile and two levels in two tiles? And what should be the default when building a bridge from one one level slope? If crossing a river, you might want to go up one level to let boats through, but it would be an unnecessary bump in the road otherwise.

AP

Can it detect what is below?  If so, perhaps it could have a different default for different waytypes, defaulting to the "most normal" in each case. So players just have to build the lower item first.  I guest that would require a list somewhere in the code it could look at. If it had a default and a  secondary function on CTRL, could that cover everything? or do you need CTRL SHIFT / CTRL ALT etc for all permutations

Experimental has more waytypes than standard, and also has masted ships which are prohibited from passing under "low bridges". A list for expermental might  look something like

Rail below, 2x mandatory
Road below,  2x mandatory
Navigable river 2x default, ctrl gives 1x
Navigable canal 2x default, ctrl gives 1x
Unnavigable river 1x default ctrl gives tall (in case might upgrade later).

I suppose you want to stop it making 1x bridges over 2x deep gorges (little dips in a road would result otherwise). And probably need to ensure it can cope with different angle slopes at each end if it can't already.

If sloperamp1 does get incorporated, I suggest rail bridges could default to trying to build those first, if space is available etc.  Depends how much work someone is minded to put into it I know. Don't want to ask the earth!

Ters

Quote from: AP on January 15, 2018, 08:19:48 PM
I suppose you want to stop it making 1x bridges over 2x deep gorges (little dips in a road would result otherwise). And probably need to ensure it can cope with different angle slopes at each end if it can't already.

A bridge that goes one down from a slope and then across? Is that even possible? I was thinking about that as a theoretical situation, but figured is would be kind of silly. I don't know of any such bridge in real life.

Quote from: AP on January 15, 2018, 08:19:48 PM
If sloperamp1 does get incorporated, I suggest rail bridges could default to trying to build those first, if space is available etc.  Depends how much work someone is minded to put into it I know. Don't want to ask the earth!
As I understand it, sloperamp1 is just topping for slopefoundation1&2, so there is no choice. (The graphics may look off without the bottom part.) Unless you mean that the game should always default to going one level up rather than straight across. I disagree with that, especially for rail bridges, as railroads should be as level as possible. Although it may depend on what is below the bridge. It should not go straight across by default if that blocks any ways below (only a problem for pak sets with half-height slopes), as per some prior discussion, I think.

Leartin

Quote from: Ters on January 15, 2018, 07:42:04 PM
As for two-tiled ramps, one would have to figure out how to select the height to build. If you just want to go over a bit of backwater from land at the same height, going up two levels would be a bit overkill. On the other hand, going up two levels should be default, or new players would get very confused as to how to build a bridge over another road. Perhaps some modifier to build the lower bridge, unless length is less than 5. Isn't there already some modifier for choosing whether to go up one or two levels if the bridge supports both height of ramps?
Currently, all bridges are low by default, but high when buildt over another way or when CTRL is pressed while building. (at least with half-height paksets)


Quote from: Ters on January 15, 2018, 07:42:04 PMCan we assume no bridge will support going up one and two levels in one tile and two levels in two tiles?
No, we cannot. I mean, I'm sure it could be programmed to only accept one or the other, but if not artificially enforced, both could exist in parallel, and someone will provide both in one bridge.

Quote from: Ters on January 15, 2018, 07:42:04 PMAnd what should be the default when building a bridge from one one level slope? If crossing a river, you might want to go up one level to let boats through, but it would be an unnecessary bump in the road otherwise.

For Two-Tile ramps, the logic would probably be:
If CTRL is not pressed, build a low bridge, if that fails, build a two-tile ramp, if that fails, build a one-tile-two-level ramp, if that fails, throw error.
Similarly, on slopes the bridge would first try to be straight (unless CTRL), then one level up, than two level up.
"failing" here means that the type of ramp does not exist in that particular bridge, that there is not enough space (for two-tile ramps), that there is something in the way, or that the bridge can't end.

AP

Quote from: Ters on January 15, 2018, 09:18:17 PM
A bridge that goes one down from a slope and then across? Is that even possible? I was thinking about that as a theoretical situation, but figured is would be kind of silly. I don't know of any such bridge in real life.
I agree it would be silly,  but was afraid that wouldn't stop a computer doing it, if faced with a rule saying "always cross at 1 level above the obstacle"
Quote
As I understand it, sloperamp1 is just topping for slopefoundation1&2, so there is no choice. (The graphics may look off without the bottom part.) Unless you mean that the game should always default to going one level up rather than straight across. I disagree with that, especially for rail bridges, as railroads should be as level as possible. Although it may depend on what is below the bridge. It should not go straight across by default if that blocks any ways below (only a problem for pak sets with half-height slopes), as per some prior discussion, I think.
I agree with you.

Ters

Quote from: Leartin on January 16, 2018, 06:11:28 AM
No, we cannot. I mean, I'm sure it could be programmed to only accept one or the other, but if not artificially enforced, both could exist in parallel, and someone will provide both in one bridge.

But the game would need to add support for selecting which of the three to build. Currently, there is only support for selecting one of two. So it is not a question of prohibiting something, but of enabling use of all hypothetical ramp configurations starting on a single flat tile with flat tiles all around. I was thinking that the purpose of two-tile ramps is to get to a bridge height of two in a pak set that doesn't allow roads of that kind going up two levels in one tile (typically trains, I imagine, which has more trouble with slopes than cars).

Quote from: AP on January 16, 2018, 12:44:23 PM
I agree it would be silly,  but was afraid that wouldn't stop a computer doing it, if faced with a rule saying "always cross at 1 level above the obstacle" I agree with you.

There is no support for a single height downward ramp on a double height downward slope, so the computer can't do it. The question is whether players want to do it. (Followed by whether artists want to draw it and developers want to program it.) You can get something kind of like it with a bit of earthworks, but the same is true for two-tile ramps.



There are quite a few theoretical combinations of terrain and ramp slopes. We currently have one up from flat ground, two up from flat ground, straight on from ground sloping one down and straight on from ground sloping two down. Leartin's image contains proposals for one up from ground sloping one down, two up from ground sloping one down, one up from ground sloping two down and two up from ground sloping two down. I don't think the last three makes much sense for symmetrical bridges like in the image, but they can make sense to have one side of a bridge.

With slopes spanning two tiles, I imagine the main purpose is going up two levels from flat ground, but it could be possible to go for example up one level on a flat tile and another level on a downward sloping tile for much higher bridges. Higher bridges could also be possible with ramps spanning more than two tiles. The only technical reason for doing so would be a crossing something that has a very high bank on one side, but not the other. For those really into visuals, going up gently more than two levels from flat ground could be for something like the Øresund Bridge, but I am only speculating as I am not one of them.

AP

The major problem with relying on earthworks (to avoid making bridge components) is balancing - some paksets (notably pak-gb) make earthworks rather expensive, based on real world balancing data, where a bridge abutment would be substantially cheaper.

The downward bridge slope is a seperate, lesser, issue than the one about long upward ramps, I think. However, in case anyone does feel like looking at it:
Quote from: Ters on January 16, 2018, 04:02:45 PMhe question is whether players want to do it.
It is possible to imagine a river in a gorge, or a road in a cutting, where the sides are steep, but where the ground level on one side is different than on the other side. I suppose in that circumstance one might want to gently ramp a railway down on the bridge itself, rather than cross at the higher level and ramp down over land afterwards.  The obvious reason would be to have fewer tiles of bridge to maintain, because engineers usually don't make bridges longer or taller than necessary.  Other reasons might be if the bridge type had a maximum height and crossing at the higher level would be too tall, or if space were constrained (e.g. junction or corner immediately after precluded the exit ramp).   

Ters

In real life, it probably would slope gently all the way, but given the discrete height levels in Simutrans, I still think it would look very silly to go down, then straight across, then down again. I can't remember seeing a bridge that slopes more on the upper end than the lower, unless I consider elevated roads bridges. I've built such silly bridges in Pontifex, but that seems to be the point on some of the levels.

Leartin

#18
Quote from: Ters on January 16, 2018, 04:02:45 PM
I was thinking that the purpose of two-tile ramps is to get to a bridge height of two in a pak set that doesn't allow roads of that kind going up two levels in one tile (typically trains, I imagine, which has more trouble with slopes than cars).

Yes, that's the purpose. However, they would still be different things, require different image definitions etc. - if steep ramps are made by defining "ramp2" and two-tile ramps are made by defining "doubleramp" (or whatever it would be), there is nothing stopping a creator from putting both graphics in the same object* - even if it's mostly useless**.
Since a creator can do that, you need to add a rule for what to do when that happens. I'm not certain the player needs complete control over which slope to use, though, just a logic of which situation causes which slope that makes sense. I think having the two-tile slope whenever you need the height and have enough space for it (which means: An empty flat tile in front of the tile you start the bridge from) allows the player enough control, since it empowers him to choose not to use that type of bridge mostly naturally (start right in front of the obstacle instead of one tile away).

* The creator might just be nice and create graphics for everything without intention for them to be used, just so others could comment out the part they don't want and use it with different paksets. Eg. a bridge that might not have steep ramps in p128 might still include the graphics for use in p128german, which has no half-heights. I created some steep slopes for ways in P192C for which I did not intend them to exist in the game, but in case someone needs them for a private copy or a fork or whatever, it would be easier for me to provide them than for anyone else to add them.

** Although - is it useless? The settings don't show an additional "price" in the pathfinding for a steep slope compared to a slight slope, but if it exists or is implemented (it should), then it might be two slight slopes are better than one steep slope. In that case, you might want to build two-tile bridges even for ways with steep slopes available. The balancing factor would be that two-tile bridges would generally be one tile per side longer, and they are usually more expensive than normal ways. So you had a balance of waycost against moneycost if both existed, even if space is no issue.


Quote from: AP on January 16, 2018, 07:43:11 PM
The major problem with relying on earthworks (to avoid making bridge components) is balancing - some paksets (notably pak-gb) make earthworks rather expensive, based on real world balancing data, where a bridge abutment would be substantially cheaper.

One could potentially make it that instead of a foundation, there would be automatic earthworks on that tile without the normal costs. There should not be too many situation where that could be abused by a player, and would save us the trouble of creating extra images. Perhaps that piece of earthwork could even be undone if the bridge was removed again? It wouldn't look as good, but it would be a solid alternative, both as for what to implement at all and as an addition for bridges which would not have new graphics for slope-ramps.

Ters

Quote from: Leartin on January 16, 2018, 10:39:04 PM
Since a creator can do that, you need to add a rule for what to do when that happens.

Not necessarily. The pak format could be such that the image slots for double-height ramps get reused for two-tile ramps, with a flag indicating whether the game should treat it one way or the other. If there is a demand for all the configurations to be possible for the same bridge, this way of implementing it will not be an option. That is why I asked.

Quote from: Leartin on January 16, 2018, 10:39:04 PM
One could potentially make it that instead of a foundation, there would be automatic earthworks on that tile without the normal costs. There should not be too many situation where that could be abused by a player, and would save us the trouble of creating extra images. Perhaps that piece of earthwork could even be undone if the bridge was removed again? It wouldn't look as good, but it would be a solid alternative, both as for what to implement at all and as an addition for bridges which would not have new graphics for slope-ramps.

I think it is easier to support more bridge components than automatic artificial slopes, especially when it comes to removal. Was the earthworks done by the player or the bridge tool? The game could just leave the earthworks behind, but then the player would get the potentially much higher cost of removing the earthworks again to build something else. On the other hand, not removing them means the player can reuse them for a different bridge. Hyperactive artist will likely agree, as it allows them more control of the look, while lazy artists will disagree, as they have to create more graphics. (Discontinued artists would disagree if they could, but if they did, they would mostly become lazy artists instead.)

Isaac Eiland-Hall

Seattle, Washington, US: I-90 bridge across Lake Washington



https://i.imgur.com/BiqS8WQ.png

To be fair, it goes slightly up on the other end because it is a floating bridge. But just providing a real-world example.

Ters

I'd say that was two different kinds of bridges joined together in the middle of the image. At least for the one in front. Hard to see how the other one is.

Leartin

Quote from: Ters on January 17, 2018, 06:55:52 AM
Not necessarily. The pak format could be such that the image slots for double-height ramps get reused for two-tile ramps, with a flag indicating whether the game should treat it one way or the other. If there is a demand for all the configurations to be possible for the same bridge, this way of implementing it will not be an option. That is why I asked.
Sure, but is that a sensible option even if you don't need all the configurations? Even if a flag was set, is there reason for the image slots to be reused, especially with one option requiring more images anyway? Seems to be rather confusing, and not beneficial. So you could do it - but I'd only expect one to do it this way with the explicit purpose of making all-configuration-bridges impossible.
(But if you would implement it by reusing an image, lose the flag. Since two-tile ramps need additional images, the existence of those would already tell whether it's two-tile or steep.)


Quote from: Ters on January 17, 2018, 06:55:52 AMHyperactive artist will likely agree, as it allows them more control of the look, while lazy artists will disagree, as they have to create more graphics. (Discontinued artists would disagree if they could, but if they did, they would mostly become lazy artists instead.)
The "more graphics" can simply be a reuse of ramp1 and one cuboid with basement/slope walls to the sides and a sidewalk on top. You don't need to be an Artist to make that happen.
My suggestion was purely under the assumption it could be easier to implement, if it isn't than I see only downsides with it.

Isaac Eiland-Hall

Quote from: Ters on January 17, 2018, 04:49:03 PM
I'd say that was two different kinds of bridges joined together in the middle of the image. At least for the one in front. Hard to see how the other one is.

Define "bridge", perhaps.

The part at water's level is a floating bridge - basically, the roadway is on floating barges - permanently. So yes, you could argue that a "standard" bridge goes down to water level and connects with the floating bridge on each end; but ultimately, many bridges have different types of sections - some sections being cable-stayed while sections on each side may extend far out with pylons. We don't consider those multiple bridges, so I'd argue this isn't either.

Then again... if Simutrans allowed bridges to be built similarly to elevated roads, that would solve many things I'd like to do. :)

Ters

Quote from: Isaac.Eiland-Hall on January 17, 2018, 07:11:52 PM
Then again... if Simutrans allowed bridges to be built similarly to elevated roads, that would solve many things I'd like to do. :)

I agree with that.

Leartin

Quote from: Ters on January 16, 2018, 04:02:45 PM
There is no support for a single height downward ramp on a double height downward slope, so the computer can't do it. The question is whether players want to do it. (Followed by whether artists want to draw it and developers want to program it.) You can get something kind of like it with a bit of earthworks, but the same is true for two-tile ramps.

Not currently, and not for bridges. But if we get to a point where steep slopes occur naturally in maps, you might want to build a two-tile-ramp to get up that hill, and in that specific case, which does not occur currently, you would need that type of ramp.


So here is another idea: What if we got an actual "ramp" object? The ramp could only be straight, start at the first tile you click, and end above the second tile you click at the height it reaches (or use drag and drop to get a preview). This ramp object could use the same images as a bridge for the start of the ramp and pillars; it would need 4 additional graphics for the "middle pieces" and 4 additional graphics for "single height downward ramp on a double height downward slope" If you start on a slope, you could press CTRL for the ramp to go down instead of up.

Since the end of the ramp can hang in mid-air, you can build such ramps first and add a bridge between them afterwards, like you can build bridges between elevated ways. Hence you can combine ramps and bridges in many ways if the basic bridge is not enough for you (eg. a bridge over an elevated road)

And in case someone thinks non-flat bridges are unrealistic:

Ters

Quote from: Leartin on January 18, 2018, 07:13:11 AM
Not currently, and not for bridges. But if we get to a point where steep slopes occur naturally in maps, you might want to build a two-tile-ramp to get up that hill, and in that specific case, which does not occur currently, you would need that type of ramp.

That is true. I never thought of that.