Signals in tunnels and on bridges V3.02 r24031

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

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Terkhen »

Or just follow the wiki for MinGW or Visual C++.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

The MingW instructions are broken - that is going to be the replacement when Terkhen gets round to it.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Terkhen »

I have already updated the MinGW tutorial. Otherwise I wouldn't link to it.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

It would probably be a good idea if I found out who I was replying to before posting <_<.

Also the last part about TT graphics and music is still outdated ;).
Black_Rose82
Engineer
Engineer
Posts: 6
Joined: 19 May 2011 22:19

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Black_Rose82 »

Hi,
works the patch with the current nightlys??


Black_Rose82
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by ChillCore »

There might be some minor conflicts to solve -> line numbers no longer corresponding, but the patch should still work with current trunk.

Have you tried?
Ifso what were the errors you were getting?
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
Black_Rose82
Engineer
Engineer
Posts: 6
Joined: 19 May 2011 22:19

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Black_Rose82 »

Yes, but i have the problem, that the signals on the bridges dont work correctly.
When i build them the bridge is only one block.

Black_Rose82
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by ChillCore »

Hmm, I applied the patch to the correct revision, bumped to trunk without conflicts and compiled without warnings ...
Still works as expected. (see attached picture.)

How long are your bridges? The gap between signals on bridges is fixed at six tiles (in the newer version from the first post).
Bridges that are shorter will always be "one block".

I have pulled a patch from my bumped source and attached it also.
Notes:
- As I have not adjusted one line, some documentation may no longer be correct (eg. bridges can be longer than 100 tiles in current trunk).
- If you build bridges with signals longer than 100 tiles you may want to ignore the colour they are displaying, the patch should function correctly despite some signals staying staying green all the time ... Hackalittlebit said he might have a looksie soonish but was rather busy living his life at the moment.
Attachments
Pundhead Transport, 20 Jun 1950.png
Pundhead Transport, 20 Jun 1950.png (25.53 KiB) Viewed 8088 times
signaltunnel_V2.02_r22489.patch
(31.52 KiB) Downloaded 279 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.
Black_Rose82
Engineer
Engineer
Posts: 6
Joined: 19 May 2011 22:19

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Black_Rose82 »

Hi,
ok now it works. thx for help.
i think i can set the signals on every tile of the brigde or every second tile, how its describe in the wiki.


Black_Rose82
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by ChillCore »

Glad your problem is solved. ;)

The wiki page might be a bit outdated ...
In older versions, possibly also in the other one in the first post, the gap was configurable but this caused issues (read: crashing vehicles) when changing it while trains were present on bridges/tunnels.

ChillCore
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
User avatar
eastpath
Engineer
Engineer
Posts: 19
Joined: 01 Aug 2011 18:04
Location: Chester, UK

Re: Signals in tunnels and on bridges V2.02 r20363

Post by eastpath »

I find this one of the most useful patches to date and an excellent addition. It is realistic as tunnels and bridges have signals anyway as anyone who's been stuck outside London Victoria or Charing Cross stations knows!

I had issues with compiling the code at all using MinGW and running it, but I have worked in a Unix/Linux environment for the last 20 years.

Having used this patch for quite some time and not experienced any problems with it until a couple of days ago. What is frustrating is that I cannot reproduce the problem nor can I explain it. Here is a quick screen shot that I grabbed and since cropped.
Dintown Transport, 25th Feb 1958.png
Dintown Transport, 25th Feb 1958.png (118.46 KiB) Viewed 7737 times
The situation was that I had converted an existing railway to 3rd rail but accidentally omitted to convert a short length of track just outside the tunnel. The first train through encountered this non electrified section, stopped, reversed slightly and was almost immediately hit by the following train. The only thing I can possibly think of is one was path signals at a junction just before the entrance to the tunnel, but again I cannot reproduce it.
Living proof that you're never too old to play!
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Signals in tunnels and on bridges V2.02 r20363

Post by HackaLittleBit »

eastpath looking at the photo you posted I can see a tunnel entrance in the right
lower corner.(tunnel 1)
To me it seems that train passing through tunnel 1 cross the visible tracks
just before the double tunnel (tunnel 2) at the same height level.
That means trains will crash.
It is possible that this track combination is the result of one of my the earlier patches. :roll:
It shouldn't be possible to construct like that anymore.
To reproduce the crash is stop train in tunnel 1 over the double track in front of
tunnel 2 and wait. :wink:

Regards.
User avatar
eastpath
Engineer
Engineer
Posts: 19
Joined: 01 Aug 2011 18:04
Location: Chester, UK

Re: Signals in tunnels and on bridges V2.02 r20363

Post by eastpath »

HackaLittleBit wrote:eastpath looking at the photo you posted I can see a tunnel entrance in the right
lower corner.(tunnel 1)
To me it seems that train passing through tunnel 1 cross the visible tracks
just before the double tunnel (tunnel 2) at the same height level.
That means trains will crash.
It is possible that this track combination is the result of one of my the earlier patches. :roll:
It shouldn't be possible to construct like that anymore.
To reproduce the crash is stop train in tunnel 1 over the double track in front of
tunnel 2 and wait. :wink:

Regards.
Thanks very much. It really puzzled me what happened there.
Living proof that you're never too old to play!
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Signals in tunnels and on bridges V3.01 r24024

Post by HackaLittleBit »

Update to trunk and added little feature.

Spacing between signals can be adjusted in advanced settings.

If more than 16 signals are used on bridge visual functioning of signals does not work correctly.
Stopping and starting of trains however is not affected.

See first post for patch

Have fun
User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Signals in tunnels and on bridges V3.01 r24024

Post by kyosuke1989 »

How close this feature is from trunk inclusion? I think this feature is very nice addon to have :)

http://wiki.openttd.org/Requested_features
Someone could update that table's column to current revision.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: Signals in tunnels and on bridges V3.01 r24024

Post by Lord Aro »

very far. this implementation is considered a 'hack' by most people, and requires more serious changes to the code to get it to work properly

as for the wiki, well., it's a wiki, do it yourself ;-)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
User avatar
eastpath
Engineer
Engineer
Posts: 19
Joined: 01 Aug 2011 18:04
Location: Chester, UK

Re: Signals in tunnels and on bridges V3.01 r24024

Post by eastpath »

HackaLittleBit wrote:Update to trunk and added little feature.
Spacing between signals can be adjusted in advanced settings.
I really like this feature, it's a very useful addition. I like to have high density lines with closely spaced signals and load balancers so it's great for short bridges too.

One little bug which I've encountered three times since installing on Monday, which I've not been able to reproduce systematically, is the random occurence of opposing signals
Signals Problem.png
Signals Problem.png (70.93 KiB) Viewed 6596 times
See bridge nearest foreground. You can correct it by clicking on one end to change direction as needed though. It also happens on tunnels and it's harder to spot then.

As I said it just happens and you need to be on your guard for it or the first time you realise is when your train is stuck like above.
Living proof that you're never too old to play!
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Signals in tunnels and on bridges V3.01 r24024

Post by HackaLittleBit »

eastpath wrote:One little bug
Thanks eastpak.

Consider it fixed!

Last signal is pure eye candy.
sig_eb.png
sig_eb.png (32.05 KiB) Viewed 6458 times
Trains that drive in the wrong direction are reversed here.

Also modified signal positioning on bridges.

See first post for patch
Please report bugs.
DFerreira8
Engineer
Engineer
Posts: 4
Joined: 28 Mar 2012 02:03

Re: Signals in tunnels and on bridges V3.02 r24031

Post by DFerreira8 »

I'm sorry if the question I am about to make is silly but after I downloaded the patch present on first post how do I "install" it?
Thanks in advance
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 11 guests