Signals on bridges

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

User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

McGrega wrote:2dev|ant

Many thanks for the decision of the first biggest problem of all players is an opportunity of installation of traffic lights on bridges.
But there was a second biggest problem of all players are traffic lights in tunnels.
Whether the decision of this problem enters into your plans?

Thanks
no offence meant, but who are you to say what the biggest problem of all players is? I have no real need for signals on bridges or in tunnels.
I for one find bridges over diagonal track etc. much more important.
But it seems the new effort for the map rewrite is going smoothly, and if that is finished all these issues can be properly dealt with.
User avatar
paijm021
Engineer
Engineer
Posts: 84
Joined: 14 Apr 2004 20:32
Location: Netherlands
Contact:

Post by paijm021 »

dev|ant wrote:Hmm, it should be ok with 3393, though I'm pretty sure I was using earlier revisions than that. I'll grab a copy of 3393 tonight and see what's going wrong.
He dev|ant,

Are you still working on this or did it prove to be a bit harder than one evening of work?
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

Hi paijm021,

I've just gone through and fixed the problem you found. It didn't take that long to fix (just a careless error on my part), but to be honest I wasn't looking forward to doing it! I've almost forgotten everything that was involved in creating this patch. That's the way my programming skills are unfortunately, use it or lose it. :oops:

I also found the bug that thepizzaking found. That one is going to be much harder to fix. :shock:
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

Actually, I just fixed it! :D New version is in the first post.
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

McGrega wrote:...traffic lights in tunnels...
I did think about it, and did some planning towards it, but it would really get out of hand to take on something like that. There's the potential for many sets of signals on the same tile - one set on a bridge, another on the surface, and many others underground in tunnels. It's just too hard to cope with that with the map array the way it is.

(You could attempt it with a linked list from the current array - but then you've still got to consider how to implement the feature in the current GUI. Basically it's far too much for me to take on, for such little gain.)
User avatar
paijm021
Engineer
Engineer
Posts: 84
Joined: 14 Apr 2004 20:32
Location: Netherlands
Contact:

Post by paijm021 »

dev|ant wrote:Actually, I just fixed it! :D New version is in the first post.
This is most appreciated. Thank you.
Basje
Engineer
Engineer
Posts: 34
Joined: 09 Oct 2003 03:29

Post by Basje »

just an idea about the signals in tunnels: wouldn't it just be possible to copy assume that the signal that is on the tile just outside the tunnel is placed every 4 (or the number set in the patch options for auto signaling) tiles, without them actually being there? Or just have trains keep 4 tiles distance?
ebik
Engineer
Engineer
Posts: 83
Joined: 19 Jul 2005 08:14
Location: Prague, Czech Republic

Post by ebik »

Basje wrote:just an idea about the signals in tunnels: wouldn't it just be possible to copy assume that the signal that is on the tile just outside the tunnel is placed every 4 (or the number set in the patch options for auto signaling) tiles, without them actually being there? Or just have trains keep 4 tiles distance?
I vote for this, maybe it can be simplified that signals are on entrance and exit (they shoud be displayed at the visible end and set to presignals or whatever (both same type!), showing apropriate graphics). This will help LOT.

Then implement signals inside tunnel every n tiles (same type as entry/exit signals, "last" block may be shorter, but I do NOT determine which end of tunel is "last", player should use correct length to avoid shorter block). The "n" should be configurable separatedly from auto signaling (On overtaking tracks I use auto signaling of length of simple block + shunts block, i.e. different from length of a block). This will not be such great help as in previous paragraph - this does not save occupied area.

The advanced way of how to do signaling will be tunnel dialog, which simply shows tracks in length of the tunnel (activated by clicking on entrance, maybe same for bridges, when you want signals on bridge tile which goes over another track). Maybe it can also show trains in tunel, this will be very nice.
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

Signals in tunnels are even further away than signals on bridges. This is because at the moment tunnels don't actually exist, only the start and end tiles do.
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
hertogjan
Director
Director
Posts: 560
Joined: 03 Jan 2006 20:45
Location: Netherlands

Post by hertogjan »

In some places, you do not want signals in tunnels. For instance tunnels below bodies of water should not have signals in it. The reason is the following: If the centre of the tunnel is the deepest point, a train should not stop there, especially if it's a heavy cargo train. It may be stuck in the middle of the tunnel. But driving through it without stopping is fine however, since the kinetic energy of the train will help it to climb the slope on the way out.
Basje
Engineer
Engineer
Posts: 34
Joined: 09 Oct 2003 03:29

Post by Basje »

lucaspiller wrote:Signals in tunnels are even further away than signals on bridges. This is because at the moment tunnels don't actually exist, only the start and end tiles do.
but couldn't it be programmed as if they were inside? E.g.: keep track of the total number of tiles the tunnel has and count the length of the trains inside. Then alllow a fill factor of let's say 50%. So if the tunnel has length 20, then total lenght of allowed trains is 10 (2x5 tiles long train, or 1x10 tiles long train etc, etc). As soon as it is full: a red signal appears on the entrance?
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Basje wrote:
lucaspiller wrote:Signals in tunnels are even further away than signals on bridges. This is because at the moment tunnels don't actually exist, only the start and end tiles do.
but couldn't it be programmed as if they were inside? E.g.: keep track of the total number of tiles the tunnel has and count the length of the trains inside. Then alllow a fill factor of let's say 50%. So if the tunnel has length 20, then total lenght of allowed trains is 10 (2x5 tiles long train, or 1x10 tiles long train etc, etc). As soon as it is full: a red signal appears on the entrance?
Hmm - then we end up with that interesting situation where fast trains overtake slow ones in the tunnel.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Basje
Engineer
Engineer
Posts: 34
Joined: 09 Oct 2003 03:29

Post by Basje »

Brianetta wrote:Hmm - then we end up with that interesting situation where fast trains overtake slow ones in the tunnel.
could you keep track of the order inwhich they enter the tunnel and use that for exiting?
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Basje wrote:
Brianetta wrote:Hmm - then we end up with that interesting situation where fast trains overtake slow ones in the tunnel.
could you keep track of the order inwhich they enter the tunnel and use that for exiting?
You could, but you'd need to be able to save that somewhere. In any case, it's not the ordering that's the problem, it's that they crash into each other as soon as they both surface (unless the tunnel was long enough for them to get clear).
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Fragothic
Engineer
Engineer
Posts: 22
Joined: 18 Apr 2004 13:26

Post by Fragothic »

I've tried to apply this DIFF onto the latest trunk version (4180), but that didn't luck. TortioseSVN returned some errors, and cygwin stopped compiling due to errors. I've applied this DIFF earlier succesfully on another, older source version.

Will someone fix this problem in the future, or do we have to live without it?
User avatar
BeSt-Com
Traffic Manager
Traffic Manager
Posts: 180
Joined: 25 May 2005 18:19
Location: Berlin/Germany
Contact:

Post by BeSt-Com »

Brianetta wrote: Hmm - then we end up with that interesting situation where fast trains overtake slow ones in the tunnel.
does this realy works for you? i get a crash if i try!
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

BeSt-Com wrote:
Brianetta wrote: Hmm - then we end up with that interesting situation where fast trains overtake slow ones in the tunnel.
does this realy works for you? i get a crash if i try!
Get a really long tunnel. Stop one train somewhere inside it. Force another train to follow. Do they crash if they pass whilst both are completely underground?
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
User avatar
BeSt-Com
Traffic Manager
Traffic Manager
Posts: 180
Joined: 25 May 2005 18:19
Location: Berlin/Germany
Contact:

Post by BeSt-Com »

yes, they do (Rev 3464, NPF, PBS! ... but i think that is not important)
madman2003
Engineer
Engineer
Posts: 116
Joined: 20 May 2004 17:21

Post by madman2003 »

Much more than a simple fix is needed now to apply this patch, any chance the author could have a look at it again?
RMJ
Traffic Manager
Traffic Manager
Posts: 160
Joined: 24 Sep 2005 13:52
Location: Denmark
Contact:

Post by RMJ »

Just wanted to say thanks for this great patch so nice that trains can run close to each other on the bridges now.. always wished for this patch. Gonna try it now :D
Post Reply

Return to “OpenTTD Development”

Who is online

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