Page 1 of 14

Signals in tunnels and on bridges V3.02 r24031

Posted: 02 Jan 2009 23:44
by HackaLittleBit
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.

Re: signals in tunnels

Posted: 03 Jan 2009 00:04
by Torben DH
Is the 2 tunnel entrances/exits on the screenshots the same tunnel?

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

Re: signals in tunnels

Posted: 03 Jan 2009 00:11
by HackaLittleBit
cleaned

Re: signals in tunnels

Posted: 03 Jan 2009 00:29
by Torben DH
looks brilliant in my opinion

why shouldnt you be able to post it?

Re: signals in tunnels

Posted: 03 Jan 2009 00:38
by HackaLittleBit
Not relevant anymore.

Re: signals in tunnels

Posted: 03 Jan 2009 02:54
by SirkoZ
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.

Re: signals in tunnels

Posted: 03 Jan 2009 03:50
by Sacro
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)

Re: signals in tunnels

Posted: 03 Jan 2009 11:07
by Torben DH
well cant get it to work

this is what happens when i start openttd

Re: signals in tunnels

Posted: 03 Jan 2009 11:46
by HackaLittleBit
Ok see above it should work now :)

Re: signals in tunnels

Posted: 03 Jan 2009 17:13
by Dimme
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

Re: signals in tunnels

Posted: 03 Jan 2009 18:15
by HackaLittleBit
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

Re: signals in tunnels

Posted: 04 Jan 2009 00:59
by Expresso
Isn't it better to make a tunnel have signals in it by letting the player build a signal on the tunnel entrance?

Re: signals in tunnels

Posted: 04 Jan 2009 12:14
by Lordmwa
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

Re: signals in tunnels V4

Posted: 08 Jan 2009 23:33
by Ammler
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

Re: signals in tunnels V4

Posted: 09 Jan 2009 02:25
by Conditional Zenith
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).

Re: signals in tunnels V4

Posted: 09 Jan 2009 10:01
by HackaLittleBit
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

Re: signals in tunnels V4

Posted: 11 Jan 2009 18:02
by Terkhen
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.

Re: signals in tunnels V4

Posted: 11 Jan 2009 20:29
by Ammler
I was looking forward to build something like this: ;-)
Image
(real swiss mountain scenarios)

Greets
Ammler

Re: signals in tunnels V4

Posted: 12 Jan 2009 09:29
by DJ Nekkid
or even worse, like in Norway:

Re: signals in tunnels V4

Posted: 12 Jan 2009 09:35
by Benny
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.