News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Bad bridge height restriction logic.

Started by DrSuperGood, February 10, 2018, 12:42:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

When trying to build a bridge over a way owned by someone else it will be correctly limited to double height (2 ground levels above). However trying this over river or ones own ways limits it to only a single height above (1 ground level). This will/should make the ways unpassable due to insufficient clearance.

Easiest way to recreate is make 2 companies. Get both companies to have a stretch of road in a flat area. Then with one company try to make a bridge over both company ways that supports double height. It will double height over the other company way but only single height over the own way.

One can solve this case by explicitly forcing a double height bridge with control modifier. However there is no modifier to explicitly force a single height bridge. This is a problem when trying to cross a river or own way which is 1 tile below. It will either construct a flat, no ramp, bridge which is only single height above the way rendering it impassable, or construct a double height bridge which is 3 ground levels above the way pointlessly forcing an unnescescary elevation rise in the way. It is not possible to solve it with the intended single height bridge for double height clearance.

The same logic for other company ways should apply to ones own ways. I cannot think of a situation where one might want only a single height bridge over ones own ways as practically every convoy needs double height clearance.

One could also solve this by allowing a modifier for forcing single height bridges. Currently there is only a modifier to force double height bridges which does not cover the case mentioned above.

This might also apply to standard.

jamespetts

Quote from: DrSuperGood on February 10, 2018, 12:42:15 AM
When trying to build a bridge over a way owned by someone else it will be correctly limited to double height (2 ground levels above). However trying this over river or ones own ways limits it to only a single height above (1 ground level). This will/should make the ways unpassable due to insufficient clearance.

This is not correct: the lower way will be passable by any vehicle that is not tall. Horse drawn road vehicles, canal barges, vans and single decker 'buses and trams can all pass under single height bridges.

Quote
One can solve this case by explicitly forcing a double height bridge with control modifier. However there is no modifier to explicitly force a single height bridge. This is a problem when trying to cross a river or own way which is 1 tile below. It will either construct a flat, no ramp, bridge which is only single height above the way rendering it impassable, or construct a double height bridge which is 3 ground levels above the way pointlessly forcing an unnescescary elevation rise in the way. It is not possible to solve it with the intended single height bridge for double height clearance.

This is because, as discussed in another thread recently, there is currently no support for the necessary graphics to allow a double height bridge starting from a sloped tile. This is an issue in Standard as well as Extended, and so the discussion of that issue was moved to the Standard extension requests subforum on the last occasion that it was raised.

QuoteThe same logic for other company ways should apply to ones own ways. I cannot think of a situation where one might want only a single height bridge over ones own ways as practically every convoy needs double height clearance.

It is not true that practically every convoy needs double height clearance: as noted above, most convoys do not require double height clearance. Only double decker 'buses, double decker trams and tall ships require double height clearance.

Quote
One could also solve this by allowing a modifier for forcing single height bridges. Currently there is only a modifier to force double height bridges which does not cover the case mentioned above.

This might also apply to standard.

I am not sure how a modifier to force a single height bridge would assist - can you elaborate?
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

Ops did not see this was replied to...

I was not aware so many convoys could work under single height bridges. When I made this post boats were in heavy use and most boats cannot work under single height bridges, especially ones sea capable.
QuoteIt is not true that practically every convoy needs double height clearance: as noted above, most convoys do not require double height clearance. Only double decker 'buses, double decker trams and tall ships require double height clearance.
Train lines appear to force double height requirements. Where as I can build a bridge over my roads which is only single height, trying to do so over railroads forces a double height clearance.

Is it intentional that all trains/train lines require high clearance?
QuoteI am not sure how a modifier to force a single height bridge would assist - can you elaborate?
An example of where this is needed is on the server game @4995,2378. This is an artificial paninsula that was created as part of the Cagbury railway line. Connecting it to the mainland by road requires crossing a sea tile with road bridge. Since sea going ships might have to sail under it, it must have a clearance of 2 above sea level.

Trying to build the bridge normally results in a flat bridge with only 1 clearance above sea level, too little for most sea going ships. Using the Ctrl modifier results in a double height bridge resulting in a clearance of 3 above sea level, more clearance than needed and a performance hazard for road vehicles. Instead the desired bridge is single height as shown in the example, giving a shallow elevation change for vehicle performance and double height clearance for sea going ships.

In order to build this bridge I had to fill the tile with land, create a single height bridge over that land tile then remove the land tile to return it to sea. This created the desired bridge, at considerable cost, but also created an ugly visual bug since removing the terrain under the bridge did not extend the bridge supports down so it appears the bridge is floating in air to some extent.

ACarlotti

Could you provide a diagram of the situation you describe, for the benefit of those of us not in the server game?

See also https://forum.simutrans.com/index.php/topic,17819.msg169835.html#msg169835 for a discussion of issues with building tall bridges.

DrSuperGood

QuoteCould you provide a diagram of the situation you describe, for the benefit of those of us not in the server game?
Attached is image showing the situation.

Left bridge is too low. Middle bridge is needlessly high. Right bridge is the sort of bridge needed in these situations.

Instead of ctrl enforcing double height bridge construction, it should enforce double height clearance over all ground the bridge spans. In the case of the sea in the example the single height bridge would be selected as to enforce double height clearance for the sea tile under its span.

ACarlotti

Ah, I see. So I think the improved behaviour here would be to have Ctrl build a bridge that is one level higher than would be built without pressing Ctrl (if that is possible). Does that sound right?

DrSuperGood

QuoteDoes that sound right?
Possibly. Would have to try it to see if it does not cause regression somewhere else.

Vladki

Have a look at at 855,482 in this save: http://list.extended.simutrans.org/debug-saves/bridges.sve
There is a ship channel one level below road ends. If you try to build a bridge as the owner of the channel or public player, it will be flat - leaving low clearance (only for barges): screen92

If you build with ctrl (or as some other player), a full height bridge will be built, although a half-height would be enough for high boats to pass. And thus it is slowing down the road vehicles: screen93

There is a workaround, but not easy for newbies to make up. Raise at leas one end of the road one level up and then build the bridge: screen94

What I wanted to build would look like this. But that required raising the channel, building a low bridge and lowering the channel again: screen95

It would be nice if building with ctrl would check the needed clearance and build only low (or even flat) bridge if it would be high enough. Or maybe there already is some hidden way how to enforce low bridge to be built?

ACarlotti


Vladki

Oh, yes. And I think your proposed solution is good:
QuoteI think the improved behaviour here would be to have Ctrl build a bridge that is one level higher than would be built without pressing Ctrl (if that is possible). Does that sound right?

Matthew

The proposed solution also seems a good idea to me.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Vladki

Maybe it should be the other way around. Default to high clearance (or the one specified in simuconf.tab as need) as if building over other players road, and use ctrl for lower bridge.

Elemental

Maybe only force high bridges if the pakset contains a vehicle for whatever type of way you are bridging over that actually requires the heigth. For example, barge, narrowboat and tubboat canals in the british pakset only have low height barges anyway.

ACarlotti

Quote from: Vladki on July 29, 2019, 05:15:15 PMMaybe it should be the other way around. Default to high clearance (or the one specified in simuconf.tab as need) as if building over other players road, and use ctrl for lower bridge.
This would create inconsistencies in the case where you're bridging over empty land that you might put a road along later. If the road isn't there, then I think the bridge should default to low. If there were a road there, I think it should still default to low.

Vladki

I disagree. Imho more consistent (and beginner friendly) is to build always high bridge, regardless of what is underneath. And as advanced feature with ctrl build low bridge if permitted.

Ranran(retired)

Building a low bridge will disturb the tiles below. So usually you can not build a low bridge over the tiles owned by others.
When the lower tile is empty and the lower bridge is built there, it seems like a kind of cheating if the lower tile is not purchased by the bridge owner at the same time.
Therefore I support the idea of Vladki.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)