Bridge unit/structure

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Bridge unit/structure

Postby Arbogast » Mon Oct 03, 2016 7:24 pm

Indeed !

User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Bridge unit/structure

Postby GriffonSpade » Sun Oct 16, 2016 8:24 am

Heh. Yeah, it can be hard to make good bridges, though. In A6B I made highway and maglev bridges, but I was kinda stumped on how one would make a dirt road's bridge that would cross an ocean or lake, and rails stumped me with contrast. (Silver on grey just looks like a blob)

User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Bridge unit/structure

Postby Arbogast » Mon Oct 17, 2016 12:44 pm

With '50 shades of grey' you'll have a wide palette.
I was thinking of a very light grey ballast on the rails and ties. Saturating said rails and ties to a stronger tint, should make a nice contrast.
The bridges themselves could be a very dark grey, again, the whole thing should make a nice contrast.
As this doesn't seem to difficult to do, I'm tempted to do it myself, just hoping that I will have enough knowledge of graphic editor.

User avatar
JTN
Elite
Posts: 462
Joined: Wed Jan 30, 2013 12:15 am

Re: Bridge unit/structure

Postby JTN » Mon Oct 17, 2016 9:34 pm

I should probably mention that I've been working on getting bridges across water into the sandbox ruleset in 2.6, as a side project. There are a couple of engine fixups I need first (to do with integrating cardinal roads) so I haven't got anything to publish yet, but here as a teaser is the help text from my WIP.
Road bridges are large bridges carrying roads across one tile of Lake or Ocean. They only run between edges of tiles (not diagonally). It is not possible to build a bridge more than one tile long, and parallel bridges may not be built on adjacent tiles.

One notable thing is that it's quite common (particularly with hex tilesets) to end up with bridges that don't go straight across a tile, but turn a corner, or have three or four exits; so tilesets will need to take account of this (I think this can be done simply, or elaborately by drawing a wide variety of exciting interchanges -- the bridge is its own extra, not just a road on water). There's nothing really to be done about this; after looking at this Wikipedia article I don't feel so bad about that.

I've limited the length of bridges over water to one tile by prohibiting a bridge tile next to another bridge tile, and used first_reqs to make them start next to land (and ConnectLand for drawing). This has the side effect of no parallel bridges, which is a bit ugly, although as above they would also look totally weird if allowed.

WRT dirt bridges: I've set Steel as the minimum requirement, so a road bridge can reasonably look modern. I've made them quite expensive (but not as expensive as Transforming; 16 settler-turns -- I didn't expect the Øresund Bridge to cost as much as the Deltawerken, although the difference is smaller than I expected).

With the current engine, I can't enforce that the bridge is between two land tiles. So there's nothing stopping you building piers all around your coast and parking land units on them to 'occupy' the tiles, which is a bit annoying.

User avatar
XYZ
Elite
Posts: 308
Joined: Fri Jan 31, 2014 12:00 pm

Re: Bridge unit/structure

Postby XYZ » Sat Nov 12, 2016 7:02 pm

Another feature worth considering is in my opinion adding the destructability of bridges. If you alter/scale the map so that rivers are complete tiles like in the German States scenario with Elbe, Rhine and Danube river you would add a strategic/tactical bombing element I miss so much. I`m already missing it when bombing cities where only units get hurt but not city structures. Bridges could also have health points.

uncivilizedplayer
Posts: 45
Joined: Sun Mar 08, 2015 9:08 pm

Re: Bridge unit/structure

Postby uncivilizedplayer » Sun Nov 13, 2016 1:08 am

how about reusing Buoy logic and give them railroad traversability properties, I would love to have intercontinental bridges

User avatar
XYZ
Elite
Posts: 308
Joined: Fri Jan 31, 2014 12:00 pm

Re: Bridge unit/structure

Postby XYZ » Thu Jan 31, 2019 6:44 am

It has been a few years. Since implementing a bridge over an ocean tile seems to be a complicated matter, what about seeing actual rivers as barriers that need physical bridges instead of just a road paved over them? Of course I dont have an idea how to implement but if graphics are needed let me know.

nef
Hardened
Posts: 154
Joined: Mon Jun 25, 2018 5:01 pm

Re: Bridge unit/structure

Postby nef » Mon Feb 04, 2019 12:59 pm

I don't see any real problem if the river is straight. My idea in general is to start with extras on the land as ramps to the bridge and then allow the bridge to connect them. reqs could ensure that the ramps were not near each other and that the bridge is cardinal. This idea may not work for hex.

Wahazar
Hardened
Posts: 200
Joined: Mon Jul 02, 2018 1:49 pm

Re: Bridge unit/structure

Postby Wahazar » Mon Feb 04, 2019 7:23 pm

I have different idea. Sort of suspension bridge over the sea, it can be build if at least one edge tile is a coast
(similar to Water Lock I previously mentioned: viewtopic.php?f=12&t=91073 but can be build opposite - on the water).

In case of square topology, one can make trick with diagonal islands or diagonal sea/lakes allowing movement of both land and sea units utilizing perpendicular diagonals. In case of hex topology, there are only 3 cardinal directions, thus this trick is not possible, and making cities as a bridges is not always possible (mindist, unhappines etc).

Thus, in my ruleset, I decided to implement both Water Locks and Bridges. Because each structure require to contact with at least one coast, maximal span would be 2 tiles - this sound reasonably, to avoid abusing such structures.