Crossing Bridges

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Crossing Bridges

Post by ashaw »

is it possible for bridges at different hights to cross one another
Farden
Engineer
Engineer
Posts: 7
Joined: 02 Aug 2007 10:03

Re: Crossing Bridges

Post by Farden »

No.
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: Crossing Bridges

Post by ashaw »

Why not?

and more so will it be possible in the future.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Crossing Bridges

Post by Roujin »

And this is so, because bridges in OpenTTD (as well as Houses) don't have any information stored how high they are. You might say that some of the smaller bridges could have something over them only two levels above, but those bridges with the huge amount of steel over them go up at least five levels or so? And it's not even the same for the whole bridge, it goes up, and down, and up...

Same for buildings - it could be a small hut, or a giant skyscraper (like the Total Town Replacement Set has) you can't build anything over.

For this reason it's not possible to have crossing bridges or bridges over houses.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Crossing Bridges

Post by Eddi »

actually, this has been part of an experiment with the bridge branch, but it has been cut from the final implementation. afaik that was mainly due to graphical glitches, the functionality was fine.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Crossing Bridges

Post by SirkoZ »

Really? Pity because crossing bridges would surely make matters simpler in some situations (competition games on small maps), or one could even build extra tangled up networks. :)
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Crossing Bridges

Post by CommanderZ »

And this is so, because bridges in OpenTTD (as well as Houses) don't have any information stored how high they are.
What about deriving their height from the bounding box of the graphics?
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Re: Crossing Bridges

Post by Celestar »

Actually, crossing bridges are no problem at all, we just miss graphics :D

Basically we would need to limit the crossing bridges to be of the same bridge (not track) type ...

Celestar
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Crossing Bridges

Post by CommanderZ »

Basically we would need to limit the crossing bridges to be of the same bridge (not track) type ...
I quite don't understand this. Why? Do you mean same height crossings or different height crossings?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Crossing Bridges

Post by Zuu »

I guess there is a need for graphics of bridge X crossing bridge Y. And if we limit X and Y to be always of the same bridge type, there is much less graphics needed.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: Crossing Bridges

Post by Timitry »

Well, i guess this suggestion was rather to make it possible that bridges can cross at different heights, so they are just on top of each other and the tracks do not really cross.
Crossing tracks on bridges would of course be very cool, too, but i guess it would be hard with the graphics and possible collisions of trains at the crossing...

I'd say to first concentrate on the first one, and if that works go on to the second one, if you are interested in this at all :)
It surely would be a great addition to the game!
dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 344
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Re: Crossing Bridges

Post by dasy2k1 »

i like the idea of bridges crossing at differnt hights,

mabie somthing could be done with the graphics so that a bridge crossing over a cantaleaver bridge would actually rework the ironwork so it goes through a square gap in the ironwork (as if the 2 bridges were bolted together there)
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Crossing Bridges

Post by deepblue2k8 »

Or if it is easier just allow it for a special (new) bridge type, to reduce the necessary amount of new graphics?

I just tried it by deactivating the check in the code if an bridge already exists. I worked fine if you dont look at the graphic glitches too close ;-)
MJS
Director
Director
Posts: 540
Joined: 28 Jul 2005 09:31

Re: Crossing Bridges

Post by MJS »

How about this: Bridge sets might carry an extra bit to show which bridges are flat - the stone and concrete bridges from the New Bridges grf, for example; and a bridge could then be built only over those, not over anything else. (Where the bit doesn't exist, assume 0.)
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Crossing Bridges

Post by CazadorSirenas »

There has been countless times when crossing bridges would have been awesome for me, specially over water. I needed a road bridge NS where there was already a train bridge going WE, and I had to rise land in the middle of the sea (very expensive) at least one tile tall enough to allow a tiny tunnel for either one of them at that exact point in the map where they crossed, even if they were at different heights... So yes, I'm really rooting for crossing bridges some day in the future :P
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

[Edited 20201012 00:47 : Improved edition is now available - further in this topic - viewtopic.php?p=1236895#p1236895 ]

1st not enough optimized version IMPLEMENTED: + crossing bridges v.01

About TopTechDreams patch pack (IMPLEMENTED some suggestions - Independence day of Ukraine 20190824 release) - see descriptions in the corresponding topic - viewtopic.php?f=33&t=85845 ( 2nd link: viewtopic.php?f=33&t=85915 )
openttd 1.9.1 + Independence day of Ukraine 20190824 release + crossing bridges v.01.exe.zip
openttd 1.9.1 + Independence day of Ukraine 20190824 release + crossing bridges v.01.exe
(1.84 MiB) Downloaded 78 times

openttd 1.9.1 + Independence day of Ukraine 20190824 release + crossing bridges v.01 - save, src.zip
openttd 1.9.1 + Independence day of Ukraine 20190824 release + crossing bridges v.01 - save, src.zip
(1.31 MiB) Downloaded 65 times

tunnelbridge_cmd - crossing bridges v.01.cpp.zip
tunnelbridge_cmd - crossing bridges v.01.cpp.zip
(46.9 KiB) Downloaded 72 times
(the same source file in smaller archive)

Changes in source code to implement this feature are marked with label (comment) :

Code: Select all

//  for Allow to cross 2 bridges
// Begin for Allow to cross 2 bridges
Last edited by TopTechDreamer on 12 Oct 2020 00:49, edited 1 time in total.
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Crossing Bridges

Post by CazadorSirenas »

Hum, yes... I was following this project of yours due to the thread on boat tunnels. I downloaded it and opened it, but... is there any reason why Avast doesn't allow me to play it? :?:
Even with admin access it simply refuses to work.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

I don't know. My old antivirus says this exe is OK.
Maybe (I don't know), your Avast doesn't like too long file names (You can rename it shorter) or not certified *.exe files ?
( Does Avast do it at all? Maybe, some other service? )

Note: This .exe file will not work alone - it needs all the other files usual for openttd.exe to work. So user needs to place this modified .exe file to the same folder, where openttd.exe (v. 1.9.1 stable) and all its support files are.
Last edited by TopTechDreamer on 09 Oct 2020 09:28, edited 1 time in total.
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Crossing Bridges

Post by CazadorSirenas »

Since I'm so clumsy and ignorant, whenever something doesn't work I always assume it's likely because I'm doing something wrong. Problem, I don't know what is it?
I put all your files in the main folder of the game and swapped the .exe for your version. Here's what it looks like:

(pìcture below)

But after Avast sent me back a message a few hours later that they analized the unknown file and found it safe, when I try to open the game the message that boots is "No available language packs (invalid versions?)"
Please, if there's anything that I should have done, do tell me. No matter how obvious it might be, I probably missed it.
Attachments
img.png
img.png (148.91 KiB) Viewed 1610 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Crossing Bridges

Post by wallyweb »

You might want to look at JGR's patch pack where he implemented bridges over stations. You might find some solutions in there.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests