I think they won't include this patch for this exact reason, to not make the work twice and to not break the savegame compatibility when this feature might be removed to include real signals on bridges/tunnelshackalittlebit wrote:I have been thinking about the developers and I am hopeful that they include my patch.
In the future when real signals will be possible I think that it will be more processor demanding so this is a nice alternative.
It leaves a minimal footprint on the signal code and non on the pathfinding code.
Signals in tunnels and on bridges V3.02 r24031
Moderator: OpenTTD Developers
Re: signals in tunnels and on bridges V16 r16138
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V16 r16138
I did the work the first time so that one they don't have to do.Wolf01 wrote:not make the work twice and to not break the save game compatibility
The code for placing signals on tunnels and bridges is vastly more complex and completely different.
save game compatibility is no big issue when you look at the code you will see that I set two bits on the tunnel bridge tile. If they would decide to go for an other system it would be very easy to reset those bits. Or as I said already this code could be complementary.
HackaLittleBit
Re: signals in tunnels and on bridges V16 r16138
I'm not sure whether it is or isn't bug, but I'll post it anyways.
I tried to make priority on bridge with the signaled bridge. With one train on the bridge, all seems to work. Signal on the exit of bridge, facing inwards, is red and the priority works. However, when there are more trains on one bridge the signal goes green after the first train passes. I've experienced same behaviour with tunnels, too.
Same problem appears, when I tried to make the two-way tunnel just by using one-way block signals (the signalling you described on wiki doesn't seem to allow more than one train in tunnel/bridge and eliminates the purpose of the patch).
I'm not sure if this is intended behaviour, if yes, then sorry.
Also, here's savegame. As I don't compile at all, I used the build in your first post. I'm not sure how much "up-to-date" is the build, though.
I tried to make priority on bridge with the signaled bridge. With one train on the bridge, all seems to work. Signal on the exit of bridge, facing inwards, is red and the priority works. However, when there are more trains on one bridge the signal goes green after the first train passes. I've experienced same behaviour with tunnels, too.
Same problem appears, when I tried to make the two-way tunnel just by using one-way block signals (the signalling you described on wiki doesn't seem to allow more than one train in tunnel/bridge and eliminates the purpose of the patch).
I'm not sure if this is intended behaviour, if yes, then sorry.
Also, here's savegame. As I don't compile at all, I used the build in your first post. I'm not sure how much "up-to-date" is the build, though.
- Attachments
-
- bug.sav
- (14.67 KiB) Downloaded 257 times
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V16 r16138
Vitus thanks for testing.
I really appreciate this.
Two way behavior I will check it out but I need some time for that.
The patch I made is mostly for one way traffic but I will have a long and hard look at it.
Regards
I really appreciate this.
Two way behavior I will check it out but I need some time for that.
The patch I made is mostly for one way traffic but I will have a long and hard look at it.
Regards
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: signals in tunnels and on bridges V16 r16138
You said you was thinking about takeing out the Bridge part of this patch please dont i realy think its great and it makes my railway net works look and run better
Also can you have a way of the player picking what single gos in the Tunnels and Bridges might be a good way to go for getting the two way single proble working.
Also can you have a way of the player picking what single gos in the Tunnels and Bridges might be a good way to go for getting the two way single proble working.
For Community Integrated Version http://code.google.com/p/civopenttd/
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V16 r16138
I think I solved that one.Vitus wrote:I'm not sure whether it is or isn't bug, but I'll post it anyways.
Please be so kind and check it out.
Now you can have two way traffic with normal block signal but with more trains in the tunnel / bridge
Train will wait until tunnel / bridge is free.
By the way you can change the distance between trains in the advanced option screen(2,4,8,16 tiles).
Regards HackalLittleBit
- Attachments
-
- signaltunnel_V17_r16177.patch
- (24.04 KiB) Downloaded 288 times
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: signals in tunnels and on bridges V17 r16177
tested and all works a dream thanks for this great patch hope it gos in trunk soon
For Community Integrated Version http://code.google.com/p/civopenttd/
-
- Tycoon
- Posts: 1534
- Joined: 14 Mar 2006 12:46
- Location: Netherlands
Re: signals in tunnels and on bridges V17 r16177
Anyone have a clue when this SUPERB patch gets implanted in newest stable release? (im not using revisions at the moment)
LOVE this work though, as you might know im doing a few mountain scenarions and i have some bridge going into tunnel without any tiles stuff so sometimes a train has to wait 20-40 tiles before it can resume, but with this i can have multi-trains in the long tunnel/bridge
1 question though
will this support my tunnel-after-bridge (aka will they be linked?)
T=Tunnel B=Bridge L=normal track
LLLLL TTTTTTTTTTTTTTTT BBBBBBBBBB LLLLLL
is that better then
LLLLL TTTTTTTTTTTTTTTT L BBBBBBBBBB LLLLLL
or would they be the same?
LOVE this work though, as you might know im doing a few mountain scenarions and i have some bridge going into tunnel without any tiles stuff so sometimes a train has to wait 20-40 tiles before it can resume, but with this i can have multi-trains in the long tunnel/bridge
1 question though
will this support my tunnel-after-bridge (aka will they be linked?)
T=Tunnel B=Bridge L=normal track
LLLLL TTTTTTTTTTTTTTTT BBBBBBBBBB LLLLLL
is that better then
LLLLL TTTTTTTTTTTTTTTT L BBBBBBBBBB LLLLLL
or would they be the same?
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: signals in tunnels and on bridges V17 r16177
I had a test with it and i think it should work the same and also its in my patch pack now i can upload a build if your like in my post
For Community Integrated Version http://code.google.com/p/civopenttd/
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V17 r16177
in CheckTrainStayInWormHole procZxBiohazardZx wrote:will this support my tunnel-after-bridge (aka will they be linked?)
after line
Code: Select all
if (v->u.rail.force_proceed || !IsFrontEngine(v)) return false;
Code: Select all
TileIndex next_tile = TileAddByDiagDir(tile, ReverseDiagDir(GetTunnelBridgeDirection(tile)));
if (IsTunnelBridgeWithSignals(next_tile) && !IsTunnelBridgeExit(next_tile)) return false;
Not really tested this quick fix.
Re: signals in tunnels and on bridges V17 r16177
Did a quick test of the new version and all seems to work well. The new version of patch not only allowed two-way signalled bridges/tunnel to be built, but you can make working priority over signalled bridge now (see attached savegame). I guess that ottdCoop will be happy about it.
Also, I included the few examples of the problem that ZxBiohazardZx was talking about. I hope it'll help you somehow.
Anyways, it is really wonderful patch. Thanks for it!
Let's hope it'll get into trunk soon.

Also, I included the few examples of the problem that ZxBiohazardZx was talking about. I hope it'll help you somehow.
Anyways, it is really wonderful patch. Thanks for it!
Let's hope it'll get into trunk soon.

- Attachments
-
- bridge.sav
- (20.42 KiB) Downloaded 235 times
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V17 r16177
Fantastic work Vitus that really helps.Vitus wrote:few examples of the problem that ZxBiohazardZx was talking about. I hope it'll help you somehow
Included patch that I think solves ZxBiohazardZx problem.
I made a exception when two tunnels/bridges are connected to each other.
In that case train just keeps going
I am not 100% sure about secondary effects of patch V18 (train reversing, traffic jams near tunnel/bridge with signal )
also included binary V18 Beta.
They are however good for testing and I would appreciate if people would do that.
Regards
- Attachments
-
- Vitus.png (21.95 KiB) Viewed 3351 times
-
- signaltunnel_V18_r16180.patch
- (24.08 KiB) Downloaded 265 times
Last edited by HackaLittleBit on 29 Apr 2009 09:08, edited 1 time in total.
Re: signals in tunnels and on bridges V17 r16177
I'm glad to help.
I've tried v18 and found two bugs so far. Everything should be in the savegame, but just to be sure: trains between two bridges seems to run into eachother, when the first one is stopped (e.g traffic jam or other kind of traffic problem ahead). They won't crash, though. Also, when you click on vagon/engine, which is on entrance/exit tile of bridge (happens with tunnels, too), it shows all trains currently on bridge/tunnel.
Aside from that, everything seems to work perfectly.

I've tried v18 and found two bugs so far. Everything should be in the savegame, but just to be sure: trains between two bridges seems to run into eachother, when the first one is stopped (e.g traffic jam or other kind of traffic problem ahead). They won't crash, though. Also, when you click on vagon/engine, which is on entrance/exit tile of bridge (happens with tunnels, too), it shows all trains currently on bridge/tunnel.
Aside from that, everything seems to work perfectly.
- Attachments
-
- bridge2.sav
- (18.47 KiB) Downloaded 226 times
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V17 r16177
That is feature for tunnels only so I fixed that one.Vitus wrote:Also, when you click on vagon/engine, which is on entrance/exit tile of bridge (happens with tunnels, too), it shows all trains currently on bridge/tunnel.
Now when you click on tunnel entrance you will be able to see trains that are inside.
Fixed!trains between two bridges seems to run into eachother
Thanks Vitus
attatchments is experimental software!
HackaLittleBit
EDIT: NOW WITH NEW TITLE SCREEN

Last edited by HackaLittleBit on 29 Apr 2009 09:22, edited 1 time in total.
Re: signals in tunnels and on bridges V17 r16177
Hi hackelittlebit.
I just had a quik look at your patch.
When i fired up the binaries you posted i had a savegame off mine as the titlescreen.
Should that happen?
I will test some more tomorrow.
EDIT:
I compiled myself now and I am getting the normal titlescreen.
I recall trying converting a savegame to title.dat a few months ago.
It did not work then because of newgrf. Maybe it is a left over from that time that now pops up.
I just do not understand it not happening with other ottd versions as they share data folder. (Only the config file for my test with the precompiled binaries is local and i only changed signal distance to 2 and autosave off.)
Most likely the problem is on my side.
/EDIT
I just had a quik look at your patch.
When i fired up the binaries you posted i had a savegame off mine as the titlescreen.
Should that happen?
I will test some more tomorrow.
EDIT:
I compiled myself now and I am getting the normal titlescreen.
I recall trying converting a savegame to title.dat a few months ago.
It did not work then because of newgrf. Maybe it is a left over from that time that now pops up.
I just do not understand it not happening with other ottd versions as they share data folder. (Only the config file for my test with the precompiled binaries is local and i only changed signal distance to 2 and autosave off.)
Most likely the problem is on my side.
/EDIT
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
-
- Tycoon
- Posts: 1534
- Joined: 14 Mar 2006 12:46
- Location: Netherlands
Re: signals in tunnels and on bridges V17 r16177
hackalittlebit wrote:Fantastic work Vitus that really helps.Vitus wrote:few examples of the problem that ZxBiohazardZx was talking about. I hope it'll help you somehow
Included patch that I think solves ZxBiohazardZx problem.
I made a exception when two tunnels/bridges are connected to each other.
In that case train just keeps going
I am not 100% sure about secondary effects of patch V18 (train reversing, traffic jams near tunnel/bridge with signal )
also included binary V18 Beta.
They are however good for testing and I would appreciate if people would do that.
Regards
lol you named the problem after meXD i was just wondering for bridge/tunnel combo's because they are realistic, i dont mind the extra normal tile, but i was simply wondering, glad i can help you improve this patch:)
Re: signals in tunnels and on bridges V17 r16177
I kinda liked seeing it there, its my first game with ecs vectors and pbs. I just wonder where you got it ?NOW WITH NEW TITLE SCREEN (Better now ChillCore?)
I never posted that.
It's cool if you want to use it but then it would better to extend with your new features.
The new one is a bit calm ...
ps:
This is how far i got untill i started patching.
It could be you will need some grf ...
- Attachments
-
- chicop eerste 07.sav
- (147.87 KiB) Downloaded 246 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V17 r16177
Don't knowChillCore wrote:I just wonder where you got it ?


Re: signals in tunnels and on bridges V17 r16177
Oh, silly me. And I though it was a bughackalittlebit wrote:That is feature for tunnels only so I fixed that one.

However, tried last version of your patch and everything seems to work perfectly now. Also, I've tried to load one of openttdcoop games (was PSG 138 I think) and played with the bridges a bit. Everything seems to run smoothly. Oh, and old savegames are compatible with your patch, which is great!
Thanks for your effort!
-
- Tycoon
- Posts: 1534
- Joined: 14 Mar 2006 12:46
- Location: Netherlands
Re: signals in tunnels and on bridges V17 r16177
will this patch be included in next stable release? im dying for it lolz
Who is online
Users browsing this forum: No registered users and 20 guests