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

Re: signals in tunnels and on bridges V17 r16177

Post by HackaLittleBit »

This is very close to definite patch.

I tested it in multiplayer and it worked fine.
It should however be tested much more.
Maybe openttdcoop is the place to do this?

I still have some doubt about reversing and I will not commit this patch until I am 100% sure.

EDIT Please go to first page to download patch http://www.tt-forums.net/viewtopic.php? ... 60&start=0

Regards HackaLittleBit
Last edited by HackaLittleBit on 02 May 2009 16:37, edited 1 time in total.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: signals in tunnels and on bridges V17 r16177

Post by ZxBiohazardZx »

alright, looks very good, hope you can get a platform for it soon, id love to see this in stable, very very good patch
Vitus
Traffic Manager
Traffic Manager
Posts: 157
Joined: 11 Mar 2009 15:15

Re: signals in tunnels and on bridges V17 r16177

Post by Vitus »

Here's another feedback from the latest version (v19).

Tried to play with train reversing. Found one situation, where the train gets stuck and doesn't want to turn back. It should be in the attachement.

The second problem I've experienced: sometimes, the train doesn't react to free track for a while (in some cases even few seconds). Bigger networks cause longer delays. Try to download for example this savegame. You'll most likely need their GRF pack (can be found here, it's version 7.3).

Now, try to replace part of mainline with signalled bridge and reverse one train on the bridge. The delay should be clearly visible.

I really don't know what could cause this. Maybe bad optimisation or huge CPU load, but I'm just guessing.

Thanks!

Edit: The idea with #openttdcoop is really great. They are now testing infrastructure sharing patch, so I guess they would be able to test this patch as well. :)
Attachments
bridge3.sav
(13.18 KiB) Downloaded 177 times
bridge.png
bridge.png (45.35 KiB) Viewed 1251 times
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V19 r16199

Post by HackaLittleBit »

Vitus wrote:The second problem I've experienced: sometimes, the train doesn't react to free track for a while (in some cases even few seconds). Bigger networks cause longer delays
This is build in behavior.

see line 292 in the patch

Code: Select all

v->load_unload_time_rem = 10;
I put this line to ease processor load.
The smaller the value, smaller waiting time but more times checking for distance between trains.
You can easily change this value to suit your needs.

I downloaded the game (2000 trains good for testing) thanks.
I am aware about this reversing problem. It is a very small problem.
Most of the reversing is done correct.
I am reluctant to change code for that issue at this moment.
I rather prefer some serious testing now.

Thanks
Vitus
Traffic Manager
Traffic Manager
Posts: 157
Joined: 11 Mar 2009 15:15

Re: signals in tunnels and on bridges V19 r16199

Post by Vitus »

hackalittlebit wrote:This is build in behavior.
Ah, I see.

I was just wondering, if you could include some kind of switch for this value (either in game options or the cfg file). However, as you don't want to make changes to the code, take this as idea for future versions.

Anyways, thanks for great patch!
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V17 r16177

Post by HackaLittleBit »

Vitus wrote:train gets stuck
Fixed that one.
Vitus wrote:the train doesn't react to free track for a while (in some cases even few seconds)
Fixed that one.

Code: Select all

v->load_unload_time_rem = 10;
changed into

Code: Select all

v->load_unload_time_rem = 4;
See first page for patch


Regards
User avatar
Sensation Lover
Transport Coordinator
Transport Coordinator
Posts: 338
Joined: 26 Feb 2009 09:17
Skype: Aron Bogdan Silviu
Location: Torino, Italy
Contact:

Re: signals in tunnels V4

Post by Sensation Lover »

DJ Nekkid wrote:or even worse, like in Norway:
how did you do that :shock: i want to know pleeeeease!
Attachments
Dranhall Transport, 21st Mar 2000.png
Dranhall Transport, 21st Mar 2000.png (45.38 KiB) Viewed 5170 times
I was in:
Austria,Belgium,Brazil,China,France,Germany,Hungary,Indonesia,Italy,Luxemburg,Malaysia,Mexico,Netherlands,Norway,Panamà,Poland,Romania,
Saudi Arabia,Singapore,Slovenia,Spain,Switzerland,Thailand,U.K.,Ukraine,U.S.A.
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: signals in tunnels V4

Post by maquinista »

Sensation Lover wrote:
DJ Nekkid wrote:or even worse, like in Norway:
how did you do that :shock: i want to know pleeeeease!
There is a example with a tunnel with curve.

But... It was done with two tunnels. Tunnels with turns is not implemented yet. Watch under the save button. There is the exit of the tunnel.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Sensation Lover
Transport Coordinator
Transport Coordinator
Posts: 338
Joined: 26 Feb 2009 09:17
Skype: Aron Bogdan Silviu
Location: Torino, Italy
Contact:

Re: signals in tunnels V4

Post by Sensation Lover »

maquinista wrote: There is a example with a tunnel with curve.

But... It was done with two tunnels. Tunnels with turns is not implemented yet. Watch under the save button. There is the exit of the tunnel.
you didn t answer my question... it was HOW DID YOU DO THAT?
I was in:
Austria,Belgium,Brazil,China,France,Germany,Hungary,Indonesia,Italy,Luxemburg,Malaysia,Mexico,Netherlands,Norway,Panamà,Poland,Romania,
Saudi Arabia,Singapore,Slovenia,Spain,Switzerland,Thailand,U.K.,Ukraine,U.S.A.
User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: signals in tunnels and on bridges V19 r16305

Post by Benny »

[quote]It was done with two tunnels.[/quote]
Image
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: signals in tunnels V4

Post by maquinista »

Sensation Lover wrote:
maquinista wrote: There is a example with a tunnel with curve.

But... It was done with two tunnels. Tunnels with turns is not implemented yet. Watch under the save button. There is the exit of the tunnel.
you didn t answer my question... it was HOW DID YOU DO THAT?
Attachments
A tunnel with curves?
A tunnel with curves?
Rutfinghill Transport, 12 Ago 1896.png (83.6 KiB) Viewed 4921 times
No, There is two tunnels.
No, There is two tunnels.
Rutfinghill Transport, 8 Ago 1896.png (81.93 KiB) Viewed 4926 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Sande
Engineer
Engineer
Posts: 29
Joined: 12 Nov 2008 07:15

Re: signals in tunnels and on bridges V19 r16399

Post by Sande »

I think, for a realistic solution, when using the teleporting tunnels, the game should offer the player an amount of tiles the train has to pass inside the tunnel. Minimal amount is calculated by the minimum length.Dunno about the speed. Maybe this can be calculated somehow, too.

I love the signals in tunnels and bridges! I hope it gets implemented.
User avatar
Sensation Lover
Transport Coordinator
Transport Coordinator
Posts: 338
Joined: 26 Feb 2009 09:17
Skype: Aron Bogdan Silviu
Location: Torino, Italy
Contact:

Re: signals in tunnels and on bridges V19 r16399

Post by Sensation Lover »

Yeah, this patch is realy great! I can construct now metros in the cities, long bridges and tunnels, it's very usefull!!!
I was in:
Austria,Belgium,Brazil,China,France,Germany,Hungary,Indonesia,Italy,Luxemburg,Malaysia,Mexico,Netherlands,Norway,Panamà,Poland,Romania,
Saudi Arabia,Singapore,Slovenia,Spain,Switzerland,Thailand,U.K.,Ukraine,U.S.A.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: signals in tunnels and on bridges V19 r16399

Post by Terkhen »

I think i did something wrong... but I compiled the patch with latest trunk and it doesn't seem to work. I can click on the tunnel's entrance to see the trains inside of the tunnel, but no matter how I fiddle with the settings, I never get more than a single train in the tunnel (or bridge) at once.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V19 r16399

Post by HackaLittleBit »

Fixed it see first post :wink:
Now it looks for Front Engine and only shows if front engine is inside tunnel.

Changed:

Code: Select all

 proc ClickTile_TunnelBridge(TileIndex tile)

line			if (v->type != VEH_TRAIN || !HasBit(v->subtype, 0)) continue;
into 			if (v->type != VEH_TRAIN || !IsFrontEngine(v)) continue;
Thanks Terkhen
Last edited by HackaLittleBit on 03 Jun 2009 10:36, edited 1 time in total.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: signals in tunnels and on bridges V20 r16507

Post by Terkhen »

Wow, that was fast. Thank you for your great work!

EDIT: I got the same problem again. I can see the train in the tunnel clicking on its entrance, but only one train enters into it... There's something else besides "Simulate signals in tunnels and bridges every N tiles" that I need to activate?
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V20 r16507

Post by HackaLittleBit »

Terkhen wrote:but only one train enters into it...
Did you read this? Is it possible you did not activate the feature?

I checked it but everything working allright.
You have to be more specific please or send me save game by PM.

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

Re: signals in tunnels and on bridges V20 r16507

Post by Terkhen »

I was missing this:
Making it a tunnel / bridge with signals just build a signal on the entrance.
I suppose that was added since I tried the patch the last time. Thanks, it is working now!
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V21 r16573

Post by HackaLittleBit »

Well I managed to plant a signal on the entrance of tunnel or bridge.
Placing it works the same as on normal rail.
The function of it is to indicate that a bridge/tunnel has signal simulation.
You can toggle the signals in order to make a one-way or a two-way tunnel/bridge.
I did not have much time to test it and I expect still some minor buggs.

Seefirst page for patch

Regards HackaLittleBit
Attachments
with signal.png
with signal.png (21.96 KiB) Viewed 4011 times
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V21 r16573

Post by HackaLittleBit »

Ok some minor bug fixes.
Fixed transparecy problem on bridges with signal
Signal on bridge flips when train passes.
Code clean up.

Patch

Regards
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests