The International Simutrans Forum

 

Author Topic: Bridges that cannot cross water  (Read 7098 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Bridges that cannot cross water
« on: November 29, 2009, 10:22:54 PM »
Might I suggest a new parameter for the .dat file for bridges: "cannot_cross_water". This would prohibit any bridge with "cannot_cross_water=1" set from spanning any sea tiles or sea/land transition tiles (but should not stop them from crossing rivers).

The reason for this is that some types of bridges (such as brick arch viaducts) are not suitable to be built where their pillars have to stand in deep water. Generally, bridges that feature a large number of small supporting pillars of one sort or another (which would generally have unlimited length) are not suitable for crossing large expanses of deep water. Currently, that cannot be simulated in Simutrans, meaning that either bridges that are suitable for use as viaducts have to have an unrealistically restricted length, or cheaper viaduct type bridges will always be used for long water crossings in preference to the more realistic and expensive suspension bridge types.

If certain bridges could not cross sea tiles, players would have to use suitable type bridges for that function, such as suspension or cantilever bridges for longer sea crossings. That would give players more interesting civil engineering choices, and provide for more variety in paksets.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #1 on: November 29, 2009, 10:29:19 PM »
I like this idea, particularly if it gets us closer to allowing elevated roads to be built on shallow water ;-)

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #2 on: November 29, 2009, 11:38:46 PM »
I hesitate to say I like this, because whilst I agree with the aim, I have a concern:

Presumably such a value would stop one building a brick viaduct over a single tile of 'sea' - ie over a small lake or 'river' (of the older kind, before we got proper rivers), which is a quite realistic thing to want to do.

Re elevated roads on shallow water, the same applies to rail. I've cited the example of the Florida Overseas Railroad before, which was mainly masonry viaducts, but it remains relevant.



I don't know how you distinguish 1 tile of (shallow) sea from 15 tiles of deep ocean, however, since I've no knowledge of the coding behind simutrans. But it's the depth that's the issue, not the distance, if we're being realistic. (the key west line was 128 miles on such bridges!)

Perhaps for the game mechanics, it is necessary or desirable to exchange one flawed model for another (less flawed) one.

Offline IgorEliezer br

  • Devotee
  • Administrator
  • *
  • Posts: 4087
  • Cake recipes are cool... REALLY!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: Bridges that cannot cross water
« Reply #3 on: November 30, 2009, 12:01:05 AM »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #4 on: November 30, 2009, 12:13:10 AM »
I proposed it thus to make it simpler: it could be done with a "maximum_depth_below_sea_level" parameter, but that might be harder to code (although I agree that the results would be more satisfactory). But I suspect that such enormous expanses of very shallow seawater are the exception rather than the rule.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #5 on: November 30, 2009, 04:54:08 AM »
the exception rather than the rule.

Depends on how you look at it. There are a lot of shallow bays that lead to long bridges - Mobile Bay, Alabama; Tampa Bay, Florida come to mind offhand...

There is a compromise in graphics - I know 1 tile = 1 km, but it's also less than that graphically, so bridge should be longer than IRL km limits, IMHO

Maybe two parameters, choosable by pak creator:
- max length
- max depth

This would allow the limitation that the pak creator wants - a shallow bridge might have a very long length; and some huge bridge might have no max depth, and some medium max length.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Bridges that cannot cross water
« Reply #6 on: November 30, 2009, 07:56:10 AM »
Maybe two parameters, choosable by pak creator:
- max length
- max depth

This would allow the limitation that the pak creator wants - a shallow bridge might have a very long length; and some huge bridge might have no max depth, and some medium max length.

This is a very good idea!

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: Bridges that cannot cross water
« Reply #7 on: November 30, 2009, 01:19:46 PM »
There should be already a maximum height parameter, which should be enforced over ocean too, I think.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Bridges that cannot cross water
« Reply #8 on: November 30, 2009, 02:14:22 PM »
Currently there are max_length & max_height. I'm not sure about the ocean depth though - height of individual bridge tiles is calculated so:

sint16 height = pos.z - welt->lookup_kartenboden(pos.get_2d())->get_hoehe();

If the method used for info about tile under cursor (could not find yet where is this calculated) returns same numbers, then no - that gives same level on all sea tiles.
« Last Edit: November 30, 2009, 02:22:47 PM by VS »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #9 on: November 30, 2009, 02:20:47 PM »
There should be already a maximum height parameter, which should be enforced over ocean too, I think.

I am aware of the current parameters. However, the problem with the maximum height parameter is that it does not discriminate between maximum height on land and maximum depth underwater. Building a viaduct 100m tall is a very different proposition indeed to building its supports 100m underwater. It is that differentiation that I am suggesting.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9556
  • Languages: De,EN,JP
Re: Bridges that cannot cross water
« Reply #10 on: November 30, 2009, 03:14:38 PM »
Actually statically it is similar, only more expensive. But honestly, I do not like imposing too much on the average player; I would rather make longer bridges more expensive.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #11 on: November 30, 2009, 03:20:01 PM »
Surely one could not build a brick arch viaduct over deep water in any event?

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Bridges that cannot cross water
« Reply #12 on: November 30, 2009, 03:21:09 PM »
Add the feature to experimental and you have another extra ;)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #13 on: November 30, 2009, 04:11:58 PM »
Add the feature to experimental and you have another extra ;)

One day, perhaps, when I've done all the other things needing to be done!

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Bridges that cannot cross water
« Reply #14 on: November 30, 2009, 05:36:27 PM »
If you want to give it a shot one day, I guess this should be the gist of what needs to be done in brueckenbauer_t::finde_ende (apart from pak format extension of course):

sint8 depth = welt->lookup_kartenboden(pos.get_2d())->ist_wasser() ? welt->lookup_kartenboden(pos.get_2d())->get_hoehe() - welt->lookup_hgt(pos.get_2d()) + 1 : 0;

Some slightly more elaborate calculation might be needed though, because of how actually heights of sloped tiles relate to their shape. And this is probably missing water line setting... anyway, some starting point.

Offline Colin

  • Devotees (Inactive)
  • *
  • Posts: 663
  • Certa Cito
Re: Bridges that cannot cross water
« Reply #15 on: November 30, 2009, 08:42:13 PM »
Why not just build a land mass at appropriate intervals. Or is this too simplistic?

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #16 on: November 30, 2009, 09:22:21 PM »
Why not just build a land mass at appropriate intervals. Or is this too simplistic?

Because in real life, although there is a case to be made that engineers to occasionally do something akin to this, it's not done.

Take the Pontchartrain Causeway:
http://en.wikipedia.org/wiki/Lake_Pontchartrain_Causeway

It's about 38.5km long - in fact, there are two of them. So, first of all, to simulate this would require allowing bridges to be ~39 tiles long. And putting land masses in the middle would work, but would be an ugly hack.

I think the idea is to try and balance allowing really long bridges (which were, imho, MUCH more of a problem before pillars were introduced - it's an entirely different discussion to talk about the length of a bridge with pillars vs. no pillars) which are needed to simulate reality, vs trying not to allow unrealistic situations.

And I think it's a difficult discussion precisely because of the differing scales... :)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #17 on: November 30, 2009, 10:27:01 PM »
Thank you very much for the suggestion - that might make a future extension easier! As for waterline, that can fairly easily be imported from the settings.

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Bridges that cannot cross water
« Reply #18 on: January 01, 2010, 04:45:35 PM »


Deja vu?

IgorTekton: I must to agree with you. That picture seems like from books by Jules Verne - but in the USA are few very long bridges (I think that most of them are road bridges, not rail bridges) over water.

All: but here is one problem - with allowing of building of elevated way over water ship transportation can pass away (I am not afraid of end of plane transportation while there I am in doubts too). Still regardless of posibility to (prepare and) build very long (without set maximum length) bridges ship transportation is alive because bridges have not curves - and when other side of land is beyond curve no else way than ship (or plane) can access that place - and it is right.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #19 on: January 01, 2010, 06:17:30 PM »
I strongly disagree with this idea. In my mind, it's easy to create a small island wherever you want, if you're determined to use bridges for everything. In fact, in my mind, that's an argument *for* elevated ways on water (or tile-by-tile bridge building, allowing for curves).

You can already do this.

Even with limits on length, all you have to do is raise two tiles using slope tools - a slope in each direction - and you have unlimited bridge lenght...

So players can choose to use bridges now, if that's what they're after.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #20 on: January 01, 2010, 06:26:20 PM »
The ability to create land from sea as cheaply as one can make existing land a little higher is a balancing issue. Perhaps consideration could be given to making it ten or fifty times more expensive to raise land that is already below sea level than it is to raise land that starts above sea level.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #21 on: January 01, 2010, 06:29:32 PM »
Antoher thought occurs to me: Perhaps elevated ways could be allowed on water if -freeplay mode is on.....

I really don't mind trying to have the game be balanced for players, but for those of us that use -freeplay, we don't care about money. :)

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Bridges that cannot cross water
« Reply #22 on: January 01, 2010, 06:58:15 PM »
I strongly disagree with this idea. In my mind, it's easy to create a small island wherever you want, if you're determined to use bridges for everything. In fact, in my mind, that's an argument *for* elevated ways on water (or tile-by-tile bridge building, allowing for curves).

You can already do this.

Even with limits on length, all you have to do is raise two tiles using slope tools - a slope in each direction - and you have unlimited bridge lenght...

So players can choose to use bridges now, if that's what they're after.

I am not sure I understood quoted words. So I am sorry for following line - and please, correct me if I am wrong - or write yes.

You disagree with building of elevated ways on water.

Offline Colin

  • Devotees (Inactive)
  • *
  • Posts: 663
  • Certa Cito
Re: Bridges that cannot cross water
« Reply #23 on: January 01, 2010, 07:42:38 PM »
In my mind, it's easy to create a small island wherever you want, if you're determined to use bridges for everything. In fact, in my mind, that's an argument *for* elevated ways on water (or tile-by-tile bridge building, allowing for curves).

You can already do this.

Even with limits on length, all you have to do is raise two tiles using slope tools - a slope in each direction - and you have unlimited bridge lenght...

So players can choose to use bridges now, if that's what they're after.

Hey Isaac, didn't you knock this idea when I suggested a few posts ago?

Quote
Because in real life, although there is a case to be made that engineers to occasionally do something akin to this, it's not done.

Putting land masses in the middle would work, but would be an ugly hack.

« Last Edit: January 01, 2010, 07:46:42 PM by Colin »

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3658
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Bridges that cannot cross water
« Reply #24 on: January 01, 2010, 10:49:27 PM »
I do *not* disagree with building elevated ways on water - I have wanted and asked for that for about as long as we've had elevated ways (although I've only spoken up a small about, hoping not to annoy Prissi :)  - just make my opinion known when the discussion arises)

What I'm saying is that my argument *for* elevated ways on water is that you can already do the same thing, just with a little more work.

My argument is: Since you can extend even the shortest-limit bridge across the entire map with the use of two slope tiles, then why not allow elevated ways on water?

If that would unbalance the game, then:
1. Perhaps an addon only - after all, I have heard of folks making busses with zero costs
2. Perhaps only when Simutrans is in free-play mode

So, I remain consistently hopeful for elevated ways on water. :)

(In my mind, allowing bridges to be built tile-by-tile would serve an equivalent, and perhaps even more useful purpose)

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Bridges that cannot cross water
« Reply #25 on: January 01, 2010, 11:27:21 PM »
OK.