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

User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Crossing Bridges

Post by CazadorSirenas »

The version I was playing with before trying this one was aleady a JGR patch, exactly jgrpp-0.26.1
I got it because it allowed more than one dock per station, which I use quite a bit.
And I'm not in the slightest interested in bridges over stations. I'd like to play this Ukranian implementing because the boat tunnels and the bridges crossing over other bridges :o
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

CazadorSirenas wrote: 09 Oct 2020 08:33 ... I put all your files in the main folder of the game and swapped the .exe for your version. ...

There is no need to delete the original openttd.exe from its main folder - it's enough just to put there the modified exe file,
and then You can run the original exe or the modified one.
Please, try run the original (official) openttd.exe (of version 1.9.1 stable, of course) from that folder. Does it work normally?
If the original openttd.exe works normally, then the modified one should do the same.
CazadorSirenas wrote: 09 Oct 2020 08:33 ... the message that boots is "No available language packs (invalid versions?)" ...
I received such error message a long time ago and don't remember, how exactly one can fix it. But, probably, this is just a question of settings (options) (or a question of missing some files from the official set of the game).
Can You play openttd (of any version) on this computer?
If yes, then which language options do You use? - Maybe, You need to switch it to English language to avoid this error in version 1.9.1. (Because all files of openttd.exe of any version are sharing one file of option settings on one computer.)
(Maybe, there is a need to switch some other options too: sound, music, graphics.)
CazadorSirenas wrote: 09 Oct 2020 11:39 The version I was playing with before trying this one was aleady a JGR patch, exactly jgrpp-0.26.1
I got it because it allowed more than one dock per station, which I use quite a bit.
And I'm not in the slightest interested in bridges over stations. I'd like to play this Ukranian implementing because the boat tunnels and the bridges crossing over other bridges :o
Thanks.
Bridges over stations may be interesting too, because docs are stations too (in "this Ukrainian implementing" it is so). Anyway, bridges over stations or other objects give more freedom for bridges in principle (and for 3d topology of the game).
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Crossing Bridges

Post by wallyweb »

CazadorSirenas wrote: 09 Oct 2020 11:39 The version I was playing with before trying this one was aleady a JGR patch, exactly jgrpp-0.26.1
I got it because it allowed more than one dock per station, which I use quite a bit.
And I'm not in the slightest interested in bridges over stations. I'd like to play this Ukranian implementing because the boat tunnels and the bridges crossing over other bridges :o
Oops! Sorry about that. My comment was for TopTechDreamer and I should have noted that. :oops:
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Crossing Bridges

Post by CazadorSirenas »

Alright, I guessed what was wrong and got to fix it. Like it's the usual with me, it was just the silliest thing... While I deleted the previous patch version I was playing and the folders, I hadn't actually uninstalled, so the new game was still trying to run on the old settlement :oops: When I realized, I unistalled everything and correctly installed 1.9.1 with your .exe modif, and now it runs smoothly. I already tried the crossing bridges and boat tunnels thing, and they work awesomely! :mrgreen:

... Only sad thing, I also noticed that this version removed many features that I used a lot in my games, like the sharing between companies. There's nothing left of that :cry: No more several docks per station, no more x32 zoom out. But that's not your fault, what you promised you delivered, for which I thank you a lot for your awesome work! And since you mentioned that docks are also stations, which I kinda overlooked, I actually admit that it annoys me quite a bit that you can't place a bridge over a lock! Somehow I constantly find myself in this situation. There's a river I want to sail, and putting up a chain of locks prevents me for making use of that area any further because no bridges above are allowed! :x

So that's an idea. If you ever go back to tweak a little more this project, try to make locks crossable too, please!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Crossing Bridges

Post by wallyweb »

An interesting feature would be a double deck bridge such as upper level road and lower level rail, both running in the same direction. Is this possible?
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

CazadorSirenas wrote: 09 Oct 2020 21:37 Alright, I guessed what was wrong and got to fix it. ... While I deleted the previous patch version I was playing and the folders, I hadn't actually uninstalled, so the new game was still trying to run on the old settlement :oops: When I realized, I unistalled everything and correctly installed 1.9.1 with your .exe modif, and now it runs smoothly. I already tried the crossing bridges and boat tunnels thing, and they work awesomely! :mrgreen:
... But that's not your fault, what you promised you delivered ...
Thank you very much for such a high appreciation! It is very pleasant, nice and cute - I'm very glad to receive it, just happy! :)
And I'm really glad that You have achieved your purpose about to have tunnels for ships and crossing bridges. :)
Bridges over locks - I noticed this task.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

wallyweb wrote: 09 Oct 2020 22:13 An interesting feature would be a double deck bridge such as upper level road and lower level rail, both running in the same direction. Is this possible?
You just read my thoughts!
I think it's possible to implement changes to allow bridge over bridge of the same direction (not only crossing but parallel too) and of different levels of height. I think it have to be almost easy and with normal optimization, because one can use the existing algorithm to define the height levels of all bridges above the given tile - just mark not only one but several levels of height for several bridges (set of bridges) instead of 1 bridge (as it is now). I'm not familiar with graphical aspect of the program, and graphical aspect is one of the most important here: we need to draw several layers of picture (of sprites) if we have several levels of bridges. One can just draw them in queue with order of ascending levels of height - this would be the simplest way to implement a set of bridges over 1 tile of map (for today's structure of map). This way would have not ideal graphical results (flipping of sprites or inappropriate disappearing/appearing of vehicles and parts of bridges), but it would be good enough for the 1st approximation. But... even for this task one needs to do some changes in the work with graphics (quite precisely). That's why I scare a little to begin this work. But you, people, inspire me to do more - to implement more dreams.

Multiple docs per 1 station - it's really a wonderful idea (this is implemented in openttd stable versions of 10.x, but I don't know yet how it works). Obviously, the same conception have to be applied to airports: to allow multiple airports in 1 station (set of terminals in the whole airport hub or, at least, a set of several runways for 1 terminal of airport similarly to several railway platforms in 1 station) - it would be a great improvement definitely. But... this is not implemented yet (by anyone, it seems).
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Crossing Bridges

Post by wallyweb »

TopTechDreamer wrote: 10 Oct 2020 01:18 You just read my thoughts!
Graphically could be a challenge. A bridge wants to extend its pillars down to the groundtile. How to do this with another bridge in between?
Also, bridge length must be considered. See Bridge Layouts.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

wallyweb wrote: 10 Oct 2020 01:42 Graphically could be a challenge. A bridge wants to extend its pillars down to the groundtile. How to do this with another bridge in between?
Also, bridge length must be considered. See Bridge Layouts.
I think, for the 1st approximation it would be good enough to draw the next - the higher - bridge just on the lower bridge. Pillars too. This is what we see in the real life: a closer to us object and its parts cover a more far object (because the point of view in openttd is "from the sky", so the higher bridge (object) is closer to our point of view then lower bridge (object), so we can just cover the lower one with the higher one).
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Crossing Bridges

Post by wallyweb »

TopTechDreamer wrote: 10 Oct 2020 02:02
wallyweb wrote: 10 Oct 2020 01:42 Graphically could be a challenge. A bridge wants to extend its pillars down to the groundtile. How to do this with another bridge in between?
Also, bridge length must be considered. See Bridge Layouts.
I think, for the 1st approximation it would be good enough to draw the next - the higher - bridge just on the lower bridge. Pillars too. This is what we see in the real life: a closer to us object and its parts cover a more far object (because the point of view in openttd is "from the sky", so the higher bridge (object) is closer to our point of view then lower bridge (object), so we can just cover the lower one with the higher one).
Can the higher bridge be made to think that the lower bridge is the ground tile and stop its pillars there while the lower bridge uses its own pillars to continue to the real groundtile?
User avatar
GarryG
Tycoon
Tycoon
Posts: 5871
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Crossing Bridges

Post by GarryG »

Be great if could have a double decker bridge .. Australia has at least one I know of in Grafton, New South Wales.
https://en.wikipedia.org/wiki/Grafton_B ... uth_Wales)

There also a few that are shared by both rail and road. There is one at a place called Menindee, New South Wales .. so wonder if shared bridge is possible?
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

GarryG wrote: 10 Oct 2020 04:43 Be great if could have a double decker bridge .. Australia has at least one I know of in Grafton, New South Wales.
https://en.wikipedia.org/wiki/Grafton_B ... uth_Wales)

There also a few that are shared by both rail and road. There is one at a place called Menindee, New South Wales .. so wonder if shared bridge is possible?
There is one more in Dnipro city, Ukraine - double decker auto-rail bridge "Amur Bridge" -
https://en.wikipedia.org/wiki/Bridges_in_Dnipro

Of course, shared bridges are possible. We can program almost anything, I think. More precisely, almost anything, what we can imagine.
In "this Ukrainian implementing" ships can go through the railroad tunnels (directly adjacent to water). But it looks not very smoothly (look at attached screenshots).
How will a bus go on the maglev or monorail railroad? Or how will a maglev train go on the asphalt road? - We can give them permission to do it, but how have it to look?
When we have it decided, we can allow it and draw it.

There is already implemented tram ways on roads and road tunnels and bridges. But I don't play with trams and know few about them. But they are sharing their ways with road vehicles. Trams are somewhere in NewGRF-s, but they have a full support in the core of openttd. But trams have significantly smaller rails then trains (graphics)... And there is, I guess, no free place in the data of map to store information about road and tram ways and additionally for railways...
But... we can program what we can imagine.
Attachments
ship goes out from the railroad (planning track) tunnel - test19, 2353-11-13#1.png
ship goes out from the railroad (planning track) tunnel - test19, 2353-11-13#1.png (163.08 KiB) Viewed 2743 times
the railroad (planning track) tunnel - test19, 2353-12-27.png
the railroad (planning track) tunnel - test19, 2353-12-27.png (162.88 KiB) Viewed 2743 times
screenshots - ship goes out from the railroad tunnel.zip
(2.54 MiB) Downloaded 68 times
Last edited by TopTechDreamer on 10 Oct 2020 21:05, edited 1 time in total.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

wallyweb wrote: 10 Oct 2020 02:30 ...
Can the higher bridge be made to think that the lower bridge is the ground tile and stop its pillars there while the lower bridge uses its own pillars to continue to the real groundtile?
Yes, one can modify the program to give this information to the correspondent function, if one knows the height of the lower bridge (with all its constructions).
But the main problem is one of the next: back pillars of the higher bridge or the height of constructions of the lower bridge:
Back (more far from us) pillars of higher bridge have to be beyond the lower bridge, but if we draw the lower bridge first, then pillars of the higher bridge will be drawn in front of the lower bridge and its constructions (which height is difficult to determine), because they will be drawn later. This (back pillars) makes trouble for the simple straight drawing of all bridges from given set just in queue. But because all the information about all bridges in set is known, so to draw them all correctly is obviously possible.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Crossing Bridges

Post by TopTechDreamer »

CazadorSirenas wrote: 09 Oct 2020 21:37 ... I actually admit that it annoys me quite a bit that you can't place a bridge over a lock! Somehow I constantly find myself in this situation. There's a river I want to sail, and putting up a chain of locks prevents me for making use of that area any further because no bridges above are allowed! :x

So that's an idea. If you ever go back to tweak a little more this project, try to make locks crossable too, please!
1st not enough optimized version IMPLEMENTED: + crossing bridges v.01.2 (v.01.2 = + bridges over water locks and any depots)

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 )

Please, check this exe with your antivirus program before open this exe. My old antivirus says this exe is OK.
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.
There is no need to delete the original openttd.exe from its main folder - it's enough just to put there the modified exe file,
and then You can run the original exe or the modified one.
Please, try run the original (official) openttd.exe (of version 1.9.1 stable, of course) from that folder. Does it work normally?
If the original openttd.exe works normally, then the modified one should do the same.

Modified source files ( *.cpp ) and saved games for example ( .sav ) are in Changes in source code to implement this features are marked with labels (comments) :
(relatively to "... 20190824 release")

Code: Select all

//  for Allow to cross 2 bridges
// Begin for Allow to cross 2 bridges

//  for Allow water locks under bridges
//  for Allow ship depots under bridges
//  for Allow rail depots under bridges
//  for Allow road depots under bridges
We can see (on the attached screenshot) some not smoothly effects of graphics, for example:
A) A ship is under a bridge, but it is drawn above this bridge - in the water lock to the East (to right) from Chartburg Airport or to the West (to left) from Chartburg Heliport.
B) Ship depot or railroad depot, or road depot are under a bridge, but their roofs protrude above the deck of that bridge - to left from Chartburg Airport and to left from Chartburg Heliport.
But these imperfections are easy to avoid - simply build bridges a little higher:
>= +2 levels of height from surface over water locks and
>= +3 levels of height from surface over any depots.
Then graphics will be OK. - For example, - 1 water lock under 3 bridges and 2 depots (ship depot and road depot) under 1 bridge between Chartburg Airport and Chartburg Heliport.
Of course, one can set prohibition for such situations (A and B) in program (by setting there indicated restrictions >= 2 and >=3 ), but... I decided not to do it yet. Maybe, some users will want to play with not perfect graphics but with less restrictions. Others can simply build higher bridges (i.e. can control this restrictions manually).
Attachments
test test bridges over water locks and any depots 03.sav.png
(1.12 MiB) Not downloaded yet
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Crossing Bridges

Post by CazadorSirenas »

... You're such an awesome person, you know? :shock: And programmer too :o
I'll hope that your work and effort gets added to the main game!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 30 guests