News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Single-height bridges over large navigable rivers

Started by ras52, January 11, 2020, 01:44:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ras52

The city generation code will happily generate a single-height bridge over a large navigable river when laying out city roads, but the UI doesn't allow me to do this myself, though it will let me build a double-height bridge.  It seems one of these must be a bug, though I'm not sure which.
Richard Smith

jamespetts

Quote from: ras52 on January 11, 2020, 01:44:00 PM
The city generation code will happily generate a single-height bridge over a large navigable river when laying out city roads, but the UI doesn't allow me to do this myself, though it will let me build a double-height bridge.  It seems one of these must be a bug, though I'm not sure which.

The issue is a complex one which has been discussed before. The trouble is that I cannot find any way of automatically generating a double height bridge, so, either the cities generate single height bridges, or they make no bridges at all, which would confine the cities in an unrealistic fashion.

The difficulty with the double height bridges is that they need ramps. If anyone can find a way of generating these bridges automatically as part of the city building code, that would be very helpful.
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.

Ranran(retired)

The way which includes river are height limited when crossing a half-height bridge. Therefore tall vehicles will not be able to pass there.
As a result, vehicles currently passing there can cause "no route".
That could be sabotage. So you cannot build a half-height bridge on someone else's way (include river).
However, you can build a half-height bridge on your track.

Quote from: ras52 on January 11, 2020, 01:44:00 PMbut the UI doesn't allow me to do this myself,
Switch to public player and try to build a bridge on the navigable river, which is initially set up. It should be possible.
However, upgrading and stealing a public river with a high grade river will not allow player to build a half bridge (´・ω・`)
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

ras52

Quote from: jamespetts on January 11, 2020, 02:14:34 PM
The issue is a complex one which has been discussed before. The trouble is that I cannot find any way of automatically generating a double height bridge, so, either the cities generate single height bridges, or they make no bridges at all, which would confine the cities in an unrealistic fashion.

I did search for previous discussion, but obviously missed it – sorry about that.  Given the choice between not generating bridges and generating single-height bridges, from a game play perspective, arguably no city bridges would be an improvement, though would make for unrealistic cities, as you say.  The single-height bridges seem to block shipping from passing underneath.  (That is right, isn't it?)   But the requirement to provide an alternative route no more than 18 tiles longer can make it very difficult to delete a bridge, even if you're deleting it with the intention of immediately building a double-height replacement.  This also causes a problem when you want to replace a bridge with one with higher weight or speed limit, because unliked with roads, you cannot do an in-place upgrade of bridges.

But better still would be to have the city generation code build double-height bridges.  I wonder whether part of the problem may be that bridges that slope upwards cannot start from downward sloping ground.  For example, if you have flat ground at level 0, with a slope down to a river at level -1, and you want the surface of the bridge to be level +1, you cannot start the bridge on the sloping tile unless you first level the ground there.  But perhaps this is an artefact of the UI rather than a fundamental constraint, as the necessary graphics all seem to exist, and it's perfectly realistic for a bridge to raise upwards from downwards-sloping ground.  Having to flatten the ground first is unrealistic and makes for poor gameplay due to the high cost of altering the height of ground.
Richard Smith

jamespetts

I did look into a proper solution to this some time ago (i.e., cities being able to build double height bridges), but could not find any way of doing this without a fundamental rewrite that would probably have taken months. I think that that interim solution was to forbid cities from building single height bridges over navigable waterways which have had traffic within the last game month, although I cannot immediately remember now whether this was implemented.
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.

prissi

The city AI does build 1 height bridges over non-navigable river and 2 height in Standard. (just tested in pak128.britain standard). So maybe you can steal there.

jamespetts

Quote from: prissi on January 14, 2020, 02:46:11 PM
The city AI does build 1 height bridges over non-navigable river and 2 height in Standard. (just tested in pak128.britain standard). So maybe you can steal there.

Interesting, thank you for that. Do you happen to know where the code for this is located?

I am slightly confused as to why this would have been different in Extended, but perhaps this was added in Standard after I had stopped routinely merging all Standard changes?
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.

Ranran(retired)

Quote from: prissi on January 14, 2020, 02:46:11 PMThe city AI does build 1 height bridges over non-navigable river and 2 height in Standard. (just tested in pak128.britain standard). So maybe you can steal there.
As far as I have confirmed in Standard, I think Prissi is talking about flat land.





Extended will try to cross the non-navigable river with a 2 height bridge in this case. This behaves differently than standard, but there is no problem.



The problem is in this case.



Extended may have a city bridge to a navigable river as follows:

Standard never builds a bridge here if the river is navigable.


Ideally it should go beyond the navigable river as follows:

This will not block the navigable river.
Of course there is no such behavior in the current standard.


If the starting point of the bridge is closer to the 1tile river, it will need to make a slope on the slope and flatten it, so it will look bad.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you - that is a most helpful explanation. This is a complex issue indeed.
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

Quote from: Ranran on January 14, 2020, 04:26:17 PMIdeally it should go beyond the navigable river as follows:

This will not block the navigable river.

Is there no graphic for an up bridge ramp on a downward terrain slope? It should not need a 5 tile bridge to cross a river in this scenario...?

Mariculous

#10
Quote from: AP on February 07, 2020, 09:23:07 PMIs there no graphic for an up bridge ramp on a downward terrain slope?
No.

Ideally we would seperate the abutment into slope compensation (to flat) and the bridge ramp itself.
That way we could get any combination of terrain slope and bridge ramp:
full height terrain slope, full height ramp slope
full height terrain slope, half height ramp slope
full height terrain slope, no ramp slope
the same for half height terrain slope
no terrain slope would only provide two options: half height bridge ramp and full height bridge ramp.
no terrain slope, no bridge slope is the only special case as in that case there won't be any abutment at all.

However, I guess that's not too easy to implement...

prissi

Standard revision 8911 builds double height bridges (if possible) using a flat starting tile and putting a ramp on it. If this is impossible, the tile will be restored to the initial  slope to river state. The bridges are usually a tile longer, but this is still better than nothing.

It will still fail if there are no river banks and no double ramps or unfourtunate slope arrangements.

Matthew

Quote from: prissi on February 12, 2020, 06:30:11 AM
Standard revision 8911 builds double height bridges (if possible) using a flat starting tile and putting a ramp on it. If this is impossible, the tile will be restored to the initial  slope to river state. The bridges are usually a tile longer, but this is still better than nothing.

It will still fail if there are no river banks and no double ramps or unfourtunate slope arrangements.

Thank you for improving this feature!  :thumbsup:
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。