Close adjacent level crossings
Moderator: OpenTTD Developers
Re: Close adjacent level crossings
Thanks for the binary, Zuu. I'll try this out later with some savegames I have sitting around with loads of road vehicles.
Re: Close adjacent level crossings
Finally found some time to give this a whirl, only to find out the zip doesn't include an executable...Zuu wrote:Here is a windows 32bit binary. Hope it helps for anyone who want to try out this patch and provide feedback to Eddi.
Re: Close adjacent level crossings
I'm sorry for the trouble that I've caused you. Thanks for telling me about the issue. I've replaced the zip file with a new one that now includes the exe file. (I have to add it manually as I can't execute the msvc makefile in my cygwin environment)FooBar wrote:Finally found some time to give this a whirl, only to find out the zip doesn't include an executable...Zuu wrote:Here is a windows 32bit binary. Hope it helps for anyone who want to try out this patch and provide feedback to Eddi.
Interesting enough there was already 8 downloads of the file when I replaced it.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Close adjacent level crossings
No worries, no harm done 
This one works fine (in starting that is), thank you.
As for the patch itself: it handles existing savegames fine. Only I'm starting to doubt whether this is the best solution. Observe the following screenshot: the road vehicle entered the level crossing when there was no train. Although by the time it gets to the other side, a train has appeared and the road vehicle will just carry on and crash into it.
With the old behaviour, the road vehicle would have stopped on the now clear track and no harm done.
Of course, with some careful (path) signal placement you can work around this very nicely in order to close the crossing enough in advance. But older savegames don't have such in place.
In conclusion, I still like the patch and the possibilities it provides. But it's not something that should be enabled by default in existing savegames. So for trunk inclusion I think this has to become an advanced setting.
What also would be nice is to only have crossing lights at the beginning and end of the crossing, like in the quick mockup below. Now this is not possible with the default level crossings, but it is possible for railtypes. For railtypes, the crossing lights are separate sprites. This should then probably come with an additional rail type flag that allows railtype authors to choose what behaviour they would like to see.

This one works fine (in starting that is), thank you.
As for the patch itself: it handles existing savegames fine. Only I'm starting to doubt whether this is the best solution. Observe the following screenshot: the road vehicle entered the level crossing when there was no train. Although by the time it gets to the other side, a train has appeared and the road vehicle will just carry on and crash into it.
With the old behaviour, the road vehicle would have stopped on the now clear track and no harm done.
Of course, with some careful (path) signal placement you can work around this very nicely in order to close the crossing enough in advance. But older savegames don't have such in place.
In conclusion, I still like the patch and the possibilities it provides. But it's not something that should be enabled by default in existing savegames. So for trunk inclusion I think this has to become an advanced setting.
What also would be nice is to only have crossing lights at the beginning and end of the crossing, like in the quick mockup below. Now this is not possible with the default level crossings, but it is possible for railtypes. For railtypes, the crossing lights are separate sprites. This should then probably come with an additional rail type flag that allows railtype authors to choose what behaviour they would like to see.
- Attachments
-
- Untitled-2.png (16.09 KiB) Viewed 8011 times
Re: Close adjacent level crossings
i agree with both of these statements, but adding a setting is unweildy before it is merged. changing the drawing of the default crossing is possible, with the help of some rail overlay sprites, but this breaks the method of Action A replacement of level crossing sprites, like in the DBSetXL, or Action A track sprite replacement, like transrapid tracks or narrow gauge/"fine scale" tracks.
i recently looked into updating the old "diagonal crossings" patch. (wait. did i just say this outloud?) the code part of this works fine, but the drawing part needs to be revamped, and probably rely on breaking the things mentioned above.
i recently looked into updating the old "diagonal crossings" patch. (wait. did i just say this outloud?) the code part of this works fine, but the drawing part needs to be revamped, and probably rely on breaking the things mentioned above.
Last edited by Eddi on 01 Aug 2011 21:45, edited 1 time in total.
- Level Crossing
- Tycoon
- Posts: 1187
- Joined: 07 Feb 2011 22:04
- Location: East Coast, United States
Re: Close adjacent level crossings
A possible solution would be to only stop if the vehicle detects that the next track has a train on it (this is detectable, right?)
Like my avatar? See my screenshot thread
Re: Close adjacent level crossings
not in a sensible way...Level Crossing wrote:A possible solution would be to only stop if the vehicle detects that the next track has a train on it (this is detectable, right?)
Re: Close adjacent level crossings
Was my previous suggestion wrt an RV possessing the track close to possible?
- Level Crossing
- Tycoon
- Posts: 1187
- Joined: 07 Feb 2011 22:04
- Location: East Coast, United States
Re: Close adjacent level crossings
That's quite unrealistic. Besides, it would make abuse overly easy (e.g. block train tracks by building a crossing and spamming trucks).Lockwood wrote:Was my previous suggestion wrt an RV possessing the track close to possible?
Like my avatar? See my screenshot thread
Re: Close adjacent level crossings
Is it? Is it really?Level Crossing wrote:That's quite unrealistic. Besides, it would make abuse overly easy (e.g. block train tracks by building a crossing and spamming trucks).Lockwood wrote:Was my previous suggestion wrt an RV possessing the track close to possible?
I'm sure I've seen informations about levelcrossings that are remotely monitored, the implication being that if the crossing were not clear the signalman would set the signal aheadof it to danger to prevent a collision.
Re: Close adjacent level crossings
Well, I guess in those cases, the crossing would be closed for new trucks to enter, but would still let old vehicles leave. It's actually quite a common system at high-speed level crossings, at least in Sweden. Of course, to avoid the problem of trucks actually hitting the train, you would have to make sure the truck reserves all tiles up until completely leaving the crossing, not only the one it's currently occupying (between - this behaviour could potentially be dependant on railtype if using NuTracks - where only e.g. > 100 km/h track would have this behavior, since lower-speed track usually don't have vehicle detection at the crossings.)
There still is room for abuse - consider for example the case where you have two successive level crossings close to each other, but with at least one tile in between. Then a train on the second track could cause a pile-up of trucks, blocking the crossing for trains indefinitely. But there are many other similar sources for abuse (just the other way around, e.g. block the road with your truck next to a crossing, send an train engine to demolish your competitors road vehicles...
There still is room for abuse - consider for example the case where you have two successive level crossings close to each other, but with at least one tile in between. Then a train on the second track could cause a pile-up of trucks, blocking the crossing for trains indefinitely. But there are many other similar sources for abuse (just the other way around, e.g. block the road with your truck next to a crossing, send an train engine to demolish your competitors road vehicles...
Re: Close adjacent level crossings
I set up a snaking track in a game vs AI.
My track tried to cross every single "enemy" road.
One PBS signal, one engine, 30 crossings closed at once.
Griefers gonna grief however you set up crossings.
My track tried to cross every single "enemy" road.
One PBS signal, one engine, 30 crossings closed at once.
Griefers gonna grief however you set up crossings.
Re: Close adjacent level crossings
let's cut this short, i will not implement this. there are too many problems with it, both conceptionally and technically.Lockwood wrote:Was my previous suggestion wrt an RV possessing the track close to possible?
Re: Close adjacent level crossings
Could you not have RVs "reserve" the crossing, so trains cannot pass over it while an RV is crossing the level crossing sections. Of course trains have priority but the vehicles on the crossing have enough time to leave the other side while the train waits.
Re: Close adjacent level crossings
no. if at all, only broken down trucks would block the crossing. regular trucks would be assumed to leave the crossing in time, if they can't, it's the player's fault.
- Level Crossing
- Tycoon
- Posts: 1187
- Joined: 07 Feb 2011 22:04
- Location: East Coast, United States
Re: Close adjacent level crossings
How about this:
Instead of having two level crossing 'states' (open, closed) have three (open, fake closed, real closed). When a train approaches a level crossing, the track it is on changes to 'real closed', which prevents RVs from entering the track. Other tracks are 'fake closed', where only vehicles that are already in the crossing are allowed to proceed.
Is this feasible?
Instead of having two level crossing 'states' (open, closed) have three (open, fake closed, real closed). When a train approaches a level crossing, the track it is on changes to 'real closed', which prevents RVs from entering the track. Other tracks are 'fake closed', where only vehicles that are already in the crossing are allowed to proceed.
Is this feasible?
Like my avatar? See my screenshot thread
Re: Close adjacent level crossings
it's a little tricky, because level crossings are one of the tiles that have almost all bits in the map array used.
- kyosuke1989
- Transport Coordinator
- Posts: 273
- Joined: 24 Mar 2008 13:04
- Location: Finland
Re: Close adjacent level crossings
When the new map array is introduced in form of more height levels, that could help in this?
Projects in progress: Finnish Trainset (DevZone)| Finnish Rail Infrastructure and Stations Set (DevZone)
Re: Close adjacent level crossings
not at all.
- doxlulzem
- Traffic Manager
- Posts: 161
- Joined: 05 Mar 2014 21:44
- Skype: carl.stonehouse1
- Location: Teesside, North Yorkshire
Re: Close adjacent level crossings
I know I sound like a reeeaaalllll noob, but where do you put the .diff, and will it change the level crossings in existing savegames?
IJN Takao is life. Why did the Shinano get converted? Gotta love NeuroTec for Garry's Mod. I even have a server!
How Can Mirrors Be Real If Our Eyes Aren't Real? - Jaden Smith 2014
How Can Mirrors Be Real If Our Eyes Aren't Real? - Jaden Smith 2014
Who is online
Users browsing this forum: No registered users and 13 guests