The International Simutrans Forum

 

Author Topic: Single-height bridges over large navigable rivers  (Read 845 times)

0 Members and 1 Guest are viewing this topic.

Offline ras52

  • *
  • Posts: 89
Single-height bridges over large navigable rivers
« 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19703
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Single-height bridges over large navigable rivers
« Reply #1 on: January 11, 2020, 02:14:34 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.

Offline Ranran

  • *
  • Posts: 869
  • Languages: ja
Re: Single-height bridges over large navigable rivers
« Reply #2 on: January 11, 2020, 02:28:23 PM »
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.

but 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 (´・ω・`)

Offline ras52

  • *
  • Posts: 89
Re: Single-height bridges over large navigable rivers
« Reply #3 on: January 11, 2020, 05:14:07 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19703
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Single-height bridges over large navigable rivers
« Reply #4 on: January 11, 2020, 05:29:53 PM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9909
  • Languages: De,EN,JP
Re: Single-height bridges over large navigable rivers
« Reply #5 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19703
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Single-height bridges over large navigable rivers
« Reply #6 on: January 14, 2020, 02:51:43 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?

Offline Ranran

  • *
  • Posts: 869
  • Languages: ja
Re: Single-height bridges over large navigable rivers
« Reply #7 on: January 14, 2020, 04:26:17 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.
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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19703
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Single-height bridges over large navigable rivers
« Reply #8 on: January 14, 2020, 09:48:19 PM »
Thank you - that is a most helpful explanation. This is a complex issue indeed.

Offline AP

  • Devotee
  • *
  • Posts: 1206
  • Languages: EN
Re: Single-height bridges over large navigable rivers
« Reply #9 on: February 07, 2020, 09:23:07 PM »
Ideally 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...?

Offline Freahk

  • *
  • Posts: 977
  • Languages: DE, EN
Re: Single-height bridges over large navigable rivers
« Reply #10 on: February 07, 2020, 10:48:34 PM »
Is 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...
« Last Edit: February 08, 2020, 03:44:46 PM by Freahk »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9909
  • Languages: De,EN,JP
Re: Single-height bridges over large navigable rivers
« Reply #11 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.

Offline Matthew

  • *
  • Posts: 335
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Single-height bridges over large navigable rivers
« Reply #12 on: February 12, 2020, 10:28:56 PM »
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: