Signals in tunnels and on bridges V3.02 r24031
Moderator: OpenTTD Developers
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V29 r19256
I do "not" devellop anymore on that patch.
I did not compile before upload.
My next signal patch I will publish soon.
I can not compile here but you have to change the following lines:
CommandCost cost; on line 932 of rail_cmd.cpp you have to move to
if (!CheckTileOwnership(tile)) return CMD_ERROR;
CommandCost cost;
the warning is because MS has difficulties swallowing boolean values.
that will do the trick
Tonight I will post updated patch
Regards
I did not compile before upload.
My next signal patch I will publish soon.
I can not compile here but you have to change the following lines:
CommandCost cost; on line 932 of rail_cmd.cpp you have to move to
if (!CheckTileOwnership(tile)) return CMD_ERROR;
CommandCost cost;
the warning is because MS has difficulties swallowing boolean values.
that will do the trick
Tonight I will post updated patch
Regards
Re: signals in tunnels and on bridges V29 r19256
hackalittlebit, I don`t want to get you angry, but that trick worked! thank you
The rest is confetti!
Re: signals in tunnels and on bridges V29 r19256
You cannot assume thathackalittlebit wrote:the warning is because MS has difficulties swallowing boolean values.
Code: Select all
true == 1
don't worry, be happy and checkout my patches
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V29 r19256
ColdIce Don't worry
changed
into
and silenced warning
3>d:\development\ottd\clean\src\tunnelbridge_cmd.cpp(900) : warning C4308: negative integral constant converted to unsigned type
3>d:\development\ottd\clean\src\tunnelbridge_cmd.cpp(900) : warning C4307: '+' : integral constant overflow
but I still have some difficulty to understand what they mean by "negative integral constant".
patch updated see first post
Regards
your rightadf88 wrote:true == 1
changed
Code: Select all
sprite = SPR_SIGNALS_BASE + (SIGTYPE_NORMAL - 1) * 16 + variant * 64 + (position << 1) + !IsTunnelBridgeExit(ti->tile);
Code: Select all
sprite = SPR_SIGNALS_BASE + ((SIGTYPE_NORMAL - 1) * 16 + variant * 64 + (position << 1) + !IsTunnelBridgeExit(ti->tile));
3>d:\development\ottd\clean\src\tunnelbridge_cmd.cpp(900) : warning C4308: negative integral constant converted to unsigned type
3>d:\development\ottd\clean\src\tunnelbridge_cmd.cpp(900) : warning C4307: '+' : integral constant overflow
but I still have some difficulty to understand what they mean by "negative integral constant".
patch updated see first post
Regards
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: signals in tunnels and on bridges V29 r19268
Hello
New tunnel bridge patch V2.
we now have working signals on brides.
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.
The whole system works with on-off signals.
Tunnels and bridges are one way only!
This gives the possibility to define entrance and exit of wormhole.
The bit of the Exit tile "never" changes.
On the exit tile is a fake signal just for the show.
The maximum bridge length in the game is 100 tile + 2 tiles for ramp.
Having 16 bits available in m2 gives the possibility to plant 16 signals.
That means 17 blocks. 100 / 17 = 6 tiles per block so every 6 tiles a signal + sign on entrances.
You don't have the possibility to change this block size. (it could be possible in tunnels though).
But I opted for not allowing due to overhead.
The code still uses the distance to other train algorithm.
This is done for efficiency reasons and to make handling of reversed trains easier.
Also Reversed trains make life difficult in wormholes. I solved the reversing by some kind of self healing of the system
That means that in the event of a train reversing in wormhole the system will come back to normal after next trains pass.
For the time being some code is not in the correct place and not optimized
This is done for various reasons and will be corrected later.
Signal placing:
Place signal on tunnel bridge ramp and toggle to desired direction.
Only When dragging one-way signals, signals will be places on wormholes according to direction.
To do:
Adjust signal x,y position
Make trains slow down before signal red inside wormhole.
Connect system to path finder.
The pathfinder should not find a path when it sees a tunnel exit coming towards a wormhole with signal simulation.
At this moment I do not know how to do this.
So at this moment you can fool the path finder by having a one way signal after the wormhole.
Have fun and regards
EDIT: below is savegame used for testing
New tunnel bridge patch V2.
we now have working signals on brides.
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.
The whole system works with on-off signals.
Tunnels and bridges are one way only!
This gives the possibility to define entrance and exit of wormhole.
The bit of the Exit tile "never" changes.
On the exit tile is a fake signal just for the show.
The maximum bridge length in the game is 100 tile + 2 tiles for ramp.
Having 16 bits available in m2 gives the possibility to plant 16 signals.
That means 17 blocks. 100 / 17 = 6 tiles per block so every 6 tiles a signal + sign on entrances.
You don't have the possibility to change this block size. (it could be possible in tunnels though).
But I opted for not allowing due to overhead.
The code still uses the distance to other train algorithm.
This is done for efficiency reasons and to make handling of reversed trains easier.
Also Reversed trains make life difficult in wormholes. I solved the reversing by some kind of self healing of the system
That means that in the event of a train reversing in wormhole the system will come back to normal after next trains pass.
For the time being some code is not in the correct place and not optimized
This is done for various reasons and will be corrected later.
Signal placing:
Place signal on tunnel bridge ramp and toggle to desired direction.
Only When dragging one-way signals, signals will be places on wormholes according to direction.
To do:
Adjust signal x,y position
Make trains slow down before signal red inside wormhole.
Connect system to path finder.
The pathfinder should not find a path when it sees a tunnel exit coming towards a wormhole with signal simulation.
At this moment I do not know how to do this.
So at this moment you can fool the path finder by having a one way signal after the wormhole.
Have fun and regards
EDIT: below is savegame used for testing
- Attachments
-
- signals.jpg (59.46 KiB) Viewed 3951 times
-
- TTo.sav
- test game
- (23.74 KiB) Downloaded 97 times
Re: New V2 signals in tunnels and on bridges V2.01 r19268
great work!!
Here is a WIN 32 build with your new patch and another one with signals in tunnels and on bridges V2.01, chunnels and Improved Build Station GUI
Here is a WIN 32 build with your new patch and another one with signals in tunnels and on bridges V2.01, chunnels and Improved Build Station GUI
- Attachments
-
- ottd_19269_signalv2.rar
- WIN32 BUILD WITH signals in tunnels and on bridges V2.01
- (3.95 MiB) Downloaded 130 times
-
- ottd_19269_chunnel_stgui_signtunbrdg.rar
- WIN32 BUILD WITH signals in tunnels and on bridges V2.01, chunnels and Improved Build Station GUI
- (3.95 MiB) Downloaded 162 times
The rest is confetti!
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: New V2 signals in tunnels and on bridges V2.01 r19268
Made an attempt to connect it to the path finder.
I think it works
see first page.
EDIT thanks eddy and RB
I think it works
see first page.
EDIT thanks eddy and RB
Re: New V2 signals in tunnels and on bridges V2.01 r19268
For the future, you need to include a COPYING file, it can be found in the main source directory.ColdIce wrote:great work!!
Here is a WIN 32 build with your new patch and another one with signals in tunnels and on bridges V2.01, chunnels and Improved Build Station GUI
Re: New V2 signals in tunnels and on bridges V2.02 r19295
Is used the compiled version by coldIce and it seems the setting "simulate signals in tunnels, bridges every ... tiles" has disappeared.
Where did it go?
Where did it go?
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: New V2 signals in tunnels and on bridges V2.02 r19295
To make working signals I had to make a choice.Marsman_ wrote:Is used the compiled version by coldIce and it seems the setting "simulate signals in tunnels, bridges every ... tiles" has disappeared.
Where did it go?
So now you have "fixed signal blocks" of 6 tiles in wormholes.
the state of the signals is kept in m2
In the future I can see that being reduced to 4 (102 tiles / 32 bits available = 4), but that would be the smallest possible "block size" without big overhead and slowing down the code.
For me 6 does perfectly. It should not become to easy the game.
Where do I get the 32 bits?
If you would put in m2 an index that would point to an array like this | tile entrance | tile exit | length | 32bits | some state bits | future reserved index |.
the same index is on both entrances with bit m5, 6 defining entrance , exit
I think that an array would actually speed up the game.
No more searching for other wormhole end.
But if you don't like it you still can download the old patch
regards
Re: New V2 signals in tunnels and on bridges V2.02 r19295
so.. here it is a new WIN32 build (with COPYING file this time )
patches: New V2 signals in tunnels and on bridges V2.02 r19295
Chunnels
Version: 19358 (see Vehicles for the newest road vehicles setting)
update to version 19373
patches: New V2 signals in tunnels and on bridges V2.02 r19295
Chunnels
Version: 19358 (see Vehicles for the newest road vehicles setting)
update to version 19373
- Attachments
-
- ottd_19358_signalschun.rar
- (3.96 MiB) Downloaded 120 times
The rest is confetti!
Re: New V2 signals in tunnels and on bridges V2.02 r19373
The signals on the bridges don't work in combination with surrounding yapp/pbs signals.
When traveling from left to right the left train is still waiting in front of the yapp signal because it is trying to reserve track until the next yapp signal, ignoring the bridge completely. It should try to reserve the track until the first signal which is on the bridge.
I know a workaround is to just put normal signals in front of and after the bridge, but I justed wanted to let you know.
A fix would be useful for intersections in compact areas.
And I do think the return of possible smaller signal intervals would add value to this patch.
Still a great patch though
Code: Select all
= normal track
t train
s signal on bridge
b bridge
y yapp signal
===y===y==ty==sbbbbbsbbbbbs=t===y===
I know a workaround is to just put normal signals in front of and after the bridge, but I justed wanted to let you know.
A fix would be useful for intersections in compact areas.
And I do think the return of possible smaller signal intervals would add value to this patch.
Still a great patch though
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: New V2 signals in tunnels and on bridges V2.02 r19373
Well this was left in sort of intentional for the time being.( two way traffic)Marsman_ wrote:The signals on the bridges don't work in combination with surrounding yapp/pbs signals.
I will leave it in for the time being so that the signal gurus can play around with it.
Remember the patch is meant to be simple.Just make it possible to cross a big mountain or large piece of water
without the usual gymnastics.
Possible but it would influence the bridge length.Marsman_ wrote:And I do think the return of possible smaller signal intervals would add value to this patch.
You have 17 signal blocks available so each tile 1 signal would mean max bridge length 17 tiles.
17 * 2 = 34, 3 = 51 and so on.
I am not going to change much in the near future (lack of time)
Regards
-
- Engineer
- Posts: 2
- Joined: 24 Mar 2010 17:57
Re: New V2 signals in tunnels and on bridges V2.02 r19495
Hello,
How do I use these patch.. Wich version is required ?
Any how to?
How do I use these patch.. Wich version is required ?
Any how to?
-
- Tycoon
- Posts: 1283
- Joined: 23 Oct 2009 19:35
- Location: Here and there, sometime or another
Re: New V2 signals in tunnels and on bridges V2.02 r19495
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---
--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---
--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
Re: New V2 signals in tunnels and on bridges V2.02 r19495
It's actually much simpler (assuming you are on Windows). Just download the binary above.
Re: New V2 signals in tunnels and on bridges V2.02 r19495
here.. a nice little shiny WIN32 update.
ONLY SIGNAL IN TUNNELS. Chunnels needs an update
revision 19518
ONLY SIGNAL IN TUNNELS. Chunnels needs an update
revision 19518
- Attachments
-
- ottd19518_signtun.rar
- (3.92 MiB) Downloaded 489 times
The rest is confetti!
Re: New V2 signals in tunnels and on bridges V2.02 r19495
Hmm i have a question, i download the rar and extract it, i overwrite all files, when i lunch the game nothing is change, any idea?!
- HackaLittleBit
- Director
- Posts: 550
- Joined: 10 Dec 2008 16:08
- Location: tile 0x0000
Re: New V2 signals in tunnels and on bridges V2.02 r19495
You have to place signal on entrance of tunnel or bridge.daxcimix wrote:nothing is change
-
- Engineer
- Posts: 26
- Joined: 14 Apr 2010 06:26
Re: New V2 signals in tunnels and on bridges V2.02 r19495
A question, I use the signal patch - works fine unless one train travelled over the bridge, after that signals have to be deleted to allow another train to pass. Any way to work around this problem?
Who is online
Users browsing this forum: No registered users and 13 guests