Signals on bridges
Moderator: OpenTTD Developers
Signals on bridges
I got bored so I wrote a patch that allows you to build signals on bridges. Bridges become just like normal track, so you can put semaphores, pre-signals, PBS, whatever. I've tested it in as many situations as I can think of, and it seems to be ok.
I've also included an auto-complete function. I think the signals gui patch has something like this. Anyway the way I've implemented it is if you hold the control key down while dragging signals, it will place signals all the way along the track (ie. around bends) until it hits a junction, tunnel, station, etc. Any bridges along the way get signals too.
Signals on bridges aren't possible with the current map array, so to do this I had to move all the signal data to it's own location. This makes the map array about 25% larger, but I doubt anyone will notice.
This is just a proof of concept for now, so the code is ugly in places, but it seems to work. I'm posting it here to get some feedback, suggestions, bugs, whatever. Let me know what you think.
Version 0.3 has fixed the bugs found by thepizzaking and paijm021.
I've also included an auto-complete function. I think the signals gui patch has something like this. Anyway the way I've implemented it is if you hold the control key down while dragging signals, it will place signals all the way along the track (ie. around bends) until it hits a junction, tunnel, station, etc. Any bridges along the way get signals too.
Signals on bridges aren't possible with the current map array, so to do this I had to move all the signal data to it's own location. This makes the map array about 25% larger, but I doubt anyone will notice.
This is just a proof of concept for now, so the code is ugly in places, but it seems to work. I'm posting it here to get some feedback, suggestions, bugs, whatever. Let me know what you think.
Version 0.3 has fixed the bugs found by thepizzaking and paijm021.
- Attachments
-
- signals.png (17 KiB) Viewed 16796 times
-
- signals_on_bridges_v0.3.diff
- Bug free so far! For r3393.
- (45.28 KiB) Downloaded 903 times
Last edited by dev|ant on 20 Feb 2006 11:37, edited 5 times in total.
IMO it's good to expend the current map array:
New map array is planned for 0.6.0 - I bet it would be around one-two years.
But let's go back to the current one. TTDP has got extended one - trams, custom bridge heads, tunnel enterances, one way roads... It's a big list of features coming with more space in the map array.
OTTD will have all of these and many more in 0.6.0 - but why to keep the community with the TTD map array while we can expand it and give the features way before 0.6.0?
Please consider this and post your opinions.
Now back to topic, I really like this patch. However, there is one thing I'd suggest:
When making a signals on bridges patch - don't put the signal completion, too. Devs don't like two-in-ones. Also IIRC signal completion is planned for 0.4.5 (Wiki says it's finished)
New map array is planned for 0.6.0 - I bet it would be around one-two years.
But let's go back to the current one. TTDP has got extended one - trams, custom bridge heads, tunnel enterances, one way roads... It's a big list of features coming with more space in the map array.
OTTD will have all of these and many more in 0.6.0 - but why to keep the community with the TTD map array while we can expand it and give the features way before 0.6.0?
Please consider this and post your opinions.
Now back to topic, I really like this patch. However, there is one thing I'd suggest:
When making a signals on bridges patch - don't put the signal completion, too. Devs don't like two-in-ones. Also IIRC signal completion is planned for 0.4.5 (Wiki says it's finished)
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
http://openttd.webfreakz.nl/r3393_signa ... ridges.rarBeSt-Com wrote:is there anybody who would compile that for Windows?? Please!!
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
Hmm, I might have thought twice about the new variable if I'd known about that page! I looked for space to add the data, but never found enough.
Actually I don't think it would be that hard. But they both mess with the signal code so much that if they were combined, they'd pretty much have to stay together!However, I like the possiblities building signals on bridges give To bad it would be nontrivial to use this at same time as my yellow signals patch
can you please separate the 2 patches in 2 diffs.
I want only the signal autocompletion.
I want only the signal autocompletion.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
signal autocompletion has been in ottd for a long time now...
you don't need a patch for that
you don't need a patch for that
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
just downloaded it to see. autocomplete is DEFINITLY NOT in the nightly
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
If you mean autocompletion in terms of signal junctions - yes, it is. But I am not talking about that. (read the posts on the top).Korenn wrote:signal autocompletion has been in ottd for a long time now...
you don't need a patch for that
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
whats this signal junction autocomplete you are talking about? that with pre-signals?gkirilov wrote:If you mean autocompletion in terms of signal junctions - yes, it is.
with auto complete
- Attachments
-
- if you had this
- Chondingtown Transport, 21st Jan 1950.PNG (14.11 KiB) Viewed 16343 times
-
- you'd get this
- Chondingtown Transport, 30th Jan 1950.PNG (14.56 KiB) Viewed 16338 times
-
- and did this
- Chondingtown Transport, 25th Jan 1950.PNG (13.89 KiB) Viewed 16337 times
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
OMG... i dont want to explain what i meant.
Korenn, probably wanted to say about the autocompletion for junctions(PBS) - (which is in the nightlies).
I want the autocompletion for straight tracks(which is in this patch and bobingabout showed).
bobingabout, read my posts.
Korenn, probably wanted to say about the autocompletion for junctions(PBS) - (which is in the nightlies).
I want the autocompletion for straight tracks(which is in this patch and bobingabout showed).
bobingabout, read my posts.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
- thepizzaking
- Traffic Manager
- Posts: 198
- Joined: 08 Aug 2005 07:47
- Location: Melbourne, Victoria, Australia
- Contact:
Found a bug, if you have a bridge, and a straight track in the opossite direction underneath and you try and build signals on the bridge(directly above the other track), it won't work properly.
Edit: Great work by the way
Edit: Great work by the way
I'm A Cobra (or so the rumours go)
Get OpenTTD, It's awesome!!
Get OpenTTD, It's awesome!!
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
it wasn't for you, it was for korenngkirilov wrote:OMG... i dont want to explain what i meant.
i see... its crap, i created a PBS junction, and it auto-completed, then i couldn't get rid of the PBS!!! every time i tried, it re-converted it.gkirilov wrote:Korenn, probably wanted to say about the autocompletion for junctions(PBS) - (which is in the nightlies).
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
I patched a source with your diff and loaded a very complex 950 trains map
with it. Worked perfectly (fast!) and was stable for one hour. Your signal placement patch works good too. The signal denstity could be a bit higher on diagonal tracks.
There are many possibilities with signals on bridges. Thank you for it. Great work.
with it. Worked perfectly (fast!) and was stable for one hour. Your signal placement patch works good too. The signal denstity could be a bit higher on diagonal tracks.
There are many possibilities with signals on bridges. Thank you for it. Great work.
BUG-Report,
As for as I know there are no bugs during play, but when you save and load afterwards signals disappear, change direction and some remain red. So there is something wrong with (at least) the 'save-array' concerning signals.
I think the bug is easy to reproduce, but if you need a savegame or anything else please say so. I used nightly r3393
As for as I know there are no bugs during play, but when you save and load afterwards signals disappear, change direction and some remain red. So there is something wrong with (at least) the 'save-array' concerning signals.
I think the bug is easy to reproduce, but if you need a savegame or anything else please say so. I used nightly r3393
2dev|ant
Many thanks for the decision of the first biggest problem is an opportunity of installation of traffic lights on bridges.
But there was a second biggest problem are traffic lights in tunnels.
Whether the decision of this problem enters into your plans?
Thanks
Many thanks for the decision of the first biggest problem is an opportunity of installation of traffic lights on bridges.
But there was a second biggest problem are traffic lights in tunnels.
Whether the decision of this problem enters into your plans?
Thanks
Last edited by McGrega on 08 Feb 2006 23:14, edited 1 time in total.
Who is online
Users browsing this forum: Bing [Bot] and 10 guests