The International Simutrans Forum

 

Author Topic: [11.8] Bridges over buildings  (Read 3718 times)

0 Members and 1 Guest are viewing this topic.

Offline MCollett

  • *
  • Posts: 214
  • Languages: en
[11.8] Bridges over buildings
« on: August 23, 2013, 02:36:38 AM »
In 11.8,
Quote
CHANGE: Bridges follow the same rules as elevated ways about the maximum permissible level of buildings beneath them.
This seems to ignore one of the key differences between elevated ways and bridges, namely that elevated ways are always only one level higher than what is beneath them, while a bridge can be any number of levels above.   I'm not convinced that a bridge over a deep valley should worry about buildings on the valley floor (especially given the various scale discrepancies there are).  To take an extreme case, you could build quite a respectable skyscraper under the Europabrücke.

Less importantly, will this only affect new construction, or will existing bridges built in earlier versions be broken if loaded into 11.8?

Best wishes,
Matthew

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.8] Bridges over buildings
« Reply #1 on: August 23, 2013, 09:45:46 AM »
Firstly to answer your latter question: this will only affect new construction. Existing bridges will remain in place and continue to be usable.

As to height relationships, this is an interesting and complex area. There is no parameter for the height of a building - only its level. Currently, all buildings of greater than level 2 (this number is configurable in the pakset) cannot be under (newly built) bridges or elevated ways. We cannot simply exclude bridges from this calculation, as that enables players to replace straight sections of elevated ways with identical bridges to bypass the limit - something that was actually happening in the online game. That resulted in bridges being built through the middle of tower blocks.

The only way of solving this is to have some precise relationship between the height of a bridge and the permissible level of building. The difficulty is what that relationship should be, especially in view of the absence of relationship between level and height. One should also bear in mind that bridges with pillars or other ground supports would get in the way of not only tall but also wide buildings, or buildings requiring substantial foundations beneath them, too.

How many real world examples are there of large structures being built beneath bridges?

Offline MCollett

  • *
  • Posts: 214
  • Languages: en
Re: [11.8] Bridges over buildings
« Reply #2 on: August 23, 2013, 10:43:28 AM »
Currently, all buildings of greater than level 2 (this number is configurable in the pakset) cannot be under (newly built) bridges or elevated ways. We cannot simply exclude bridges from this calculation, as that enables players to replace straight sections of elevated ways with identical bridges to bypass the limit
Only at one end, since at present a bridge has to rest on the ground (level or sloped) at one end, and cannot be built from elevated way to elevated way.  But even so, I agree it shouldn't be possible.
Quote
The only way of solving this is to have some precise relationship between the height of a bridge and the permissible level of building. The difficulty is what that relationship should be, especially in view of the absence of relationship between level and height.
I would suggest that the restriction simply not apply if the ground level of the building is two or more height levels below the bridge. 

Best wishes,
Matthew

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: [11.8] Bridges over buildings
« Reply #3 on: August 23, 2013, 04:36:04 PM »
Or have buildings define a height parameter.

Offline Carl

  • Devotee
  • *
  • Posts: 1614
    • Website
  • Languages: EN
Re: [11.8] Bridges over buildings
« Reply #4 on: August 23, 2013, 05:18:23 PM »
One irritating (and presumably unintended) side effect of this change is that it's often now not possible to build road bridges which cross rail stations. (Presumably this occurs with station buildings/platforms which exceed a certain 'level').

A serious issue with this behaviour is that it is inconsistent. When you try to build a bridge over a station, you receive an error. But if you delete the station, then build the bridge over the track, you can then go back and re-build the station underneath the bridge. This seems silly. If I'm able to build the station underneath the bridge, I should be able to build the bridge over the station.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.8] Bridges over buildings
« Reply #5 on: August 23, 2013, 06:09:39 PM »
Two levels would not be sufficient. See the attached screenshot: the difference in height here between the bridge deck (level 3) and the base of both buildings (level -1) is 4. Both buildings, incidentally, are identical: the one under the bridge is clipped because that is how the graphics code handles this situation.

As to defining height in the buildings' .dat files, that is one idea - but (1) what would be the units; and (2) what would be the default?



Edit: For the time being, I have disabled the building/bridge check for station/stop buildings to deal with the problem identified by Carl (on the 11.x branch).
« Last Edit: August 23, 2013, 06:21:03 PM by jamespetts »

Offline waerth

  • *
  • Posts: 151
Re: [11.8] Bridges over buildings
« Reply #6 on: August 23, 2013, 07:16:03 PM »
Ahhhhhhhhhhhhhhhhh now I know why I can never build bridges over stations anymore :p ....... and have to go back later to build the station. Hadn't reported it as a bug yet, because I felt it was part of the game. It has been since the start of the 11.xx

Offline Leartin at

  • Devotee
  • *
  • Posts: 1278
  • PAK-DEV P192C
  • Languages: DE, EN
Re: [11.8] Bridges over buildings
« Reply #7 on: August 23, 2013, 07:37:29 PM »
Wouldn't it be enough to read the height by the number of z dimension of the picture? After all, each point of z dimension should be as much as two height levels - not ideal, because you never know how much content the top picture has (maybe just the top of a flagtower or a bit of smoke) but it would be first step. Maybe additionally just an additional indicator how much of the top picture is in use measured from the top from 0 (all the way up, standard if nothing else stated) to 4 (nothing there, just clip it and build anyway) - 4 of course with half heights in mind.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: [11.8] Bridges over buildings
« Reply #8 on: August 23, 2013, 07:52:20 PM »
Height would just be measured in terms of z. So if we are at 0 with a building with height 4 then the lowest height a bridge could be built over would be 4.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: [11.8] Bridges over buildings
« Reply #9 on: August 23, 2013, 08:19:32 PM »
Measuring the image height in the Y direction could be a quick way to approximate this and would probably work for 95% of the building graphics.

A pakset could have a field to state how many pixels high one elevation represents (probably in the 10-20 pixel range) and then the game can look at a building graphic and see what the highest Y pixel is in the image and if it will fit underneath that elevated way graphic.  If it's just a bit too high still, it will clip like in the image above and won't matter if it's "close enough".  Images that have a dramatic elevation change between the front of the tile and the back wouldn't work as well but most buildings would work this way.  Certainly a lot easier than setting a "height" parameter for every single building.

If we look at the example above, this would work perfect for this building.  The roof access is a bit higher graphically than the back corner of the building but if that little roof access is clipped off under the bridge no one will care.  You could leave a few pixels extra gap in the calculation too: if the pakset limit is 15, cut off buildings that are 12 pixels high or something.

Offline MCollett

  • *
  • Posts: 214
  • Languages: en
Re: [11.8] Bridges over buildings
« Reply #10 on: August 23, 2013, 08:40:34 PM »
Two levels would not be sufficient. See the attached screenshot

Yes, but that's a purely cosmetic issue, caused by scale inconsistencies.   

Best wishes,
Matthew

Offline isidoro

  • Devotee
  • *
  • Posts: 1129
Re: [11.8] Bridges over buildings
« Reply #11 on: August 23, 2013, 10:54:38 PM »
Wouldn't it be enough to read the height by the number of z dimension of the picture?
[...]

I worked on a patch just for that time ago (before my computer broke down and lost it) since it was in the TODO list of Standard.  It didn't seem very difficult to me up to the point I was able to reach.  If I recall it correctly, there was a bridge builder object and a method that checked tile by tile in the span of the bridge if it could be built.  The only thing to do was to add a supplementary condition to see how many images the building underneath had in that tile and act accordingly...

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: [11.8] Bridges over buildings
« Reply #12 on: August 26, 2013, 11:31:17 PM »
To take an extreme case, you could build quite a respectable skyscraper under the Europabrücke.

While it would fit, i highly doubt one would get a building permit. If there is good land for such a large construction under the bridge, it is also very likely the bridge has some type of support. I doubt anyone would risk interfering with the static stability of a bridge's pillar by digging the foundations for a high rise.

Examples to be found* on the net suggest two types: elevated ways spann over small to mid-sized buildings; small (often historically significant) buildings under parts of major bridges. The latter suggests when building a massive bridge project, one sooner knocks down anything in the way, unless it so important that such is not possible.


* i found only two large structures under buildings they are in Quebec and China respectively. A bridge building at pont jacques cartier which supports the bridge itself. A 6 story house that was in the way for a bridge in china, with the bridge just being built over it.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: [11.8] Bridges over buildings
« Reply #13 on: August 26, 2013, 11:51:48 PM »
Seems to me that there would be serious safety concerns with building a bridge over existing buildings (Bridge decks have been known to collapse during construction).  It would also impede access to the bridge deck during construction.  I find lots of examples of parking lots, parks and light industrial areas (no buildings, or maybe a portable structure or two and some shipping containers) but very few examples of actual buildings being located beneath a bridge deck.


Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [11.8] Bridges over buildings
« Reply #14 on: August 27, 2013, 02:02:44 AM »
although not strictly a bridge, elevated ways can sometimes have shops or storage units underneath.

Offline pwhk

  • *
  • Posts: 60
  • Languages: ZH, EN
Re: [11.8] Bridges over buildings
« Reply #15 on: August 27, 2013, 06:45:37 AM »
As a side note, in fact in real world there are road bridges that go through buildings :)

http://en.wikipedia.org/wiki/Gate_Tower_Building

http://goo.gl/maps/tigBE

Of course, simulating this would be non-trivial (and these are rare in real world too) and definitely require some artwork.
« Last Edit: August 27, 2013, 07:11:56 AM by pwhk »

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: [11.8] Bridges over buildings
« Reply #16 on: August 27, 2013, 07:51:08 PM »
Hello all
I can me rember that in Japan in the city tokjo gives railway lines there standing small houses under it.