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

Post Reply
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Signals in tunnels and on bridges V3.02 r24031

Post by HackaLittleBit » 02 Jan 2009 23:44

Visit my wiki page for complete informationhttp://wiki.openttd.org/User:HackaLittleBit


For compiled version see Chill's patchpack

Special thanks to Belugas for providing chunks of signal placing code. :-)

___________________________________________

Signal Patch


Tunnel bridge patch.
we now have working signals on brides. (Only block signals)
You can still load an old game with the old signal patch, but you have to change the signals on your wormholes.
Other games should not be a problem.

Decontaminating the game is when you remove all wormholes with signals.
Light or semaphore signals change according to your "build signals before ..." in advanced settings.

Be shure you have block signals before and after the bridges and tunnels.

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.
Attachments
signaltunnel_V3.02_r24031.patch
(34.62 KiB) Downloaded 2534 times
Last edited by HackaLittleBit on 16 Mar 2012 17:04, edited 94 times in total.

User avatar
Torben DH
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 31 Dec 2004 09:09
Location: Denmark

Re: signals in tunnels

Post by Torben DH » 03 Jan 2009 00:04

Is the 2 tunnel entrances/exits on the screenshots the same tunnel?

and someone plase compile for windows so we can start testing :D
TDH

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels

Post by HackaLittleBit » 03 Jan 2009 00:11

cleaned
Last edited by HackaLittleBit on 26 Mar 2009 02:34, edited 3 times in total.

User avatar
Torben DH
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 31 Dec 2004 09:09
Location: Denmark

Re: signals in tunnels

Post by Torben DH » 03 Jan 2009 00:29

looks brilliant in my opinion

why shouldnt you be able to post it?
TDH

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels

Post by HackaLittleBit » 03 Jan 2009 00:38

Not relevant anymore.
Last edited by HackaLittleBit on 26 Mar 2009 02:34, edited 6 times in total.

User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1506
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: signals in tunnels

Post by SirkoZ » 03 Jan 2009 02:54

This is a great patch - one of the things that has constantly been overlooked by OpenTTD developers. Of course now left is some sort of simulation of signals on bridges and congestions are solved.

Sacro
Tycoon
Tycoon
Posts: 1141
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Re: signals in tunnels

Post by Sacro » 03 Jan 2009 03:50

Torben Paw wrote:looks brilliant in my opinion

why shouldnt you be able to post it?
Because he can't follow the GPL (must include LICENCE file)
We Am De Best

Host of ThroughTheTube site

User avatar
Torben DH
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 31 Dec 2004 09:09
Location: Denmark

Re: signals in tunnels

Post by Torben DH » 03 Jan 2009 11:07

well cant get it to work

this is what happens when i start openttd
Attachments
error
error
error.PNG (5.49 KiB) Viewed 57045 times
TDH


User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: signals in tunnels

Post by Dimme » 03 Jan 2009 17:13

Hi,

I especially like the option to build undersea tunnels 8) Is it possible to make a patch where the undersea tunnel is built automatically if the tunnel-exit is a shore (i.e. if the entrance is at level 0, and there is no possible exit, then it will look for the first possible exit on the next shore). Then there will be no need to use the ctrl-button, and unrealistic tunnels between mountains will be impossible.
( o/\...... /\o )
.......\..../
.........\/


IMO, that kind of undersea tunnel is more realistic than previous attempts to have several levels below sealevel, as in RL, the entrances to these tunnels are usually at or above sealevel.

Such a patch may also easier reach trunk, as it can be made much shorter, since all the signal stuff can be omitted.

Allowing trains to pass each other inside a tunnel, is IMO a bit unrealistic, so I would not play with that option.

Finally, I have a few extra thoughts about such tunnels:
If undersea tunnels are made, then how should one decide whether to build a tunnel or a bridge? obviously, this depends on the depth, and on geological conditions, which are not part of the OTTD world. Is it possible to simulate that the undersea tunnel goes down a few levels, and then up again, in the calculation of how long time the train/rv uses to go through?

Where I'm from, we have a few undersea road-tunnels. These go down to 200-300 meters below the surface, descending at 8%, which really makes loaded trucks slow down on their way up.

A theoretical depth can maybe be calculated based on the surrounding landscape. The landscape under the sea can often be guessed from the steepness of the shore. (But of course, having some undersea levels would be the best.)


happy new year 8)
Dimme
Try my modular airports minigame!

Image

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels

Post by HackaLittleBit » 03 Jan 2009 18:15

I agree that a invisible tunnel between mountains is unrealistic.
But the idea is based on the habit of model railroaders to let trains pop up on unexpected locations.
By the way that part of the hack has still some bugs.
You can build for example a tunnel in between the tunnel and get some unexpected results.
If wormhole passes other bridgeend train will disconnect.
I am looking at that now and maybe it is a nice idea to only allow passing over water.
The purpose of this post was to get feedback and maybe get some help.
The basic algorithm functions.
Two things have to be improved:
Reversing of train and getting train out of tunnel with track reservation.

Thanks for your post and I'll keep in touch.

Regards HackaLittleBit

User avatar
Expresso
Tycoon
Tycoon
Posts: 1739
Joined: 09 Aug 2004 00:14
Location: Gouda, the Netherlands

Re: signals in tunnels

Post by Expresso » 04 Jan 2009 00:59

Isn't it better to make a tunnel have signals in it by letting the player build a signal on the tunnel entrance?

User avatar
Lordmwa
President
President
Posts: 896
Joined: 20 May 2006 19:30
Location: West Sussex, England

Re: signals in tunnels

Post by Lordmwa » 04 Jan 2009 12:14

This is a great step towards something that is really needed.

Eventually i hope that it will be possible to have an underground view like in rollercoaster tycoon. That way it will be possible to build signals, junctions and stations underground. My aim for stations would be that you have to have a single tile above ground as the entrance. Also that building underground would be very expensive unless it was just a standard tunnel
The TT forums trivia tournament! Come along and join in the fun
http://www.funtrivia.com/private/main.cfm?tid=90722

User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: signals in tunnels V4

Post by Ammler » 08 Jan 2009 23:33

Looks really interesting, but the format of the patch is strange.

Maybe you could try to make the patch with svn or Mercurial?

Check other project in this Forum, how they make the patches, might help you.

Anyway, I hope I can soon see how it works, too. :-)

Greets
Ammler

Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: signals in tunnels V4

Post by Conditional Zenith » 09 Jan 2009 02:25

What the above poster said. It is a bit of a pain to extract a zip and then apply 3 patches to test this feature. Could you please release a single patch file (keep the zip by all means if you want, just give us a single patch file like every other patch does). If you have trouble doing this, then post up which version control client you are using, and someone can give you instructions (or check the development section of the wiki, it should have stuff).

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels V4

Post by HackaLittleBit » 09 Jan 2009 10:01

Ok I changed the patch into signaltunnel.patch
am usin tortoise.
TortoiseSVN 1.5.6, Build 14908 - 32 Bit , 2008/12/20 11:51:04
Subversion 1.5.5,
apr 1.2.12
apr-utils 1.2.12
berkeley db 4.4.20
neon 0.28.3
OpenSSL 0.9.8i 15 Sep 2008
zlib 1.2.3

Tried to incorporate TTo.sav game to make testing easier.
You can get that file when you download the compiled version now.
See first message for download

This patch is still in development I'm bussy trying to make it work with track reservation.
That will take time
After that I will try to make it more compatible with the overall game philosophy and make it more user friendly.
For now I would appreciate if you tell me about bugs, errors, coding style etc.
The code for the CTRL feature when building a tunnel still has to be improved an is provisorical.
Am thinking about the remark of Dimme to allow that feature only under water.

Thanks for the reply.

Regards HackaLittleBit

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

Re: signals in tunnels V4

Post by Terkhen » 11 Jan 2009 18:02

The patch format is better now, but you should do it against trunk root folder, not against the src folder.

I've been trying the patch for a while, and I think it's a good first step, but I really think you should concentrate only in one thing: first get tunnels with signals working perfectly, then you can try underground tunnels (which seems a lot more complicated to me).

I think that determining the kind of signals to put in the tunnel by the one at the entrance is the best option.

User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: signals in tunnels V4

Post by Ammler » 11 Jan 2009 20:29

I was looking forward to build something like this: ;-)
Image
(real swiss mountain scenarios)

Greets
Ammler

User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: signals in tunnels V4

Post by DJ Nekkid » 12 Jan 2009 09:29

or even worse, like in Norway:
Attachments
Dranhall Transport, 21st Mar 2000.png
Dranhall Transport, 21st Mar 2000.png (45.38 KiB) Viewed 54937 times
Member of the
ImageImage

User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: signals in tunnels V4

Post by Benny » 12 Jan 2009 09:35

Haha, I can recognize that!
But back to subject: Shouldnt this patch be renamed to "Teleporting tunnels"? I haven compiled this patch, but it doesn't seem like this patch makes it possible to make signals in tunnels? Correct me if I am wrong.
Image

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests