Patch: another pbs for r11923

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

wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11760

Post by wolfc »

Version 0.2 has two opposite terminals crash free, although there is a deadlock sometimes when trains can't find clear path to their destination. Tunnels and bridges remain broken though. ;-)
User avatar
Expresso
Tycoon
Tycoon
Posts: 1760
Joined: 09 Aug 2004 00:14
Location: Gouda, the Netherlands

Re: Patch: another pbs for r11760

Post by Expresso »

Well, got a nice bug in relation to pre-signals and depots. I'm aware the use of pre-signals is reduced a lot with this patch, but I deliberately deviated from the expected behavior to expose bugs. I hope this is of some use to you.
Attachments
In this screenshot the train fails to leave the depot while the route to it's destination (the station shown in the screenshot) is clear and available. Sorry, cut of a bit too much in the screenshot.
In this screenshot the train fails to leave the depot while the route to it's destination (the station shown in the screenshot) is clear and available. Sorry, cut of a bit too much in the screenshot.
pbs-fail-to-leave-depot.png (17.93 KiB) Viewed 4389 times
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: another pbs for r11760

Post by pavel1269 »

Atm, if you are making patch which is changing signal states, better and better functionalyti in most cases result in more and more bugs in presignals :)
wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11760

Post by wolfc »

Expresso wrote:Well, got a nice bug in relation to pre-signals and depots. I'm aware the use of pre-signals is reduced a lot with this patch, but I deliberately deviated from the expected behavior to expose bugs. I hope this is of some use to you.
I didn't disable the old signal behavior yet of waiting for any exit signal to be green. (Another example that YAPF is not finished. Without PBS YAPF is not consulted for a train move. So the train is spit out and left to it's devices (/signals). This leads to trains heading every way but the right way.)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: another pbs for r11760

Post by planetmaker »

Expresso wrote:Well, got a nice bug in relation to pre-signals and depots. I'm aware the use of pre-signals is reduced a lot with this patch, but I deliberately deviated from the expected behavior to expose bugs. I hope this is of some use to you.
IIRC this works exactly this way with the default behaviour I also experience in the latest beta or nightly.
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: Patch: another pbs for r11760

Post by CMircea »

Holy...I can't wait to compile this baby and start a game, bugs or no bugs, first real PBS system in OTTD!

[OoffTopic]Is it just me, or OpenTTD has almost caught up with the patch? NewInd. was a big step, PBS is yet another, what's left?[/OffTopic]
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Patch: another pbs for r11760

Post by FooBar »

Desolator wrote:first real PBS system in OTTD!
Was the one in the MiniIN not real enough? It worked for me back then.
Desolator wrote: [OoffTopic]Is it just me, or OpenTTD has almost caught up with the patch? NewInd. was a big step, PBS is yet another, what's left?[/OffTopic]
Well, there's still a lot of stuff I'd like to use in Open:
- Snow in temperate
- Custom bridgeheads
- Enhanced tunnel entrances
- And of course PBS, but that's heading in the right direction now!
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: Patch: another pbs for r11760

Post by richk67 »

Snow in Temperate will be part of a new All-Climate* World that will be developed this spring. It will allow all climates in one map (yes, even Toyland).

*which climates are included at generation will be selectable. So you can choose Arctic+Tropical for your Kilimanjaro scenario if you want.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
blitzkrieg
Engineer
Engineer
Posts: 105
Joined: 30 Jun 2006 04:22

Re: Patch: another pbs for r11760

Post by blitzkrieg »

Desolator wrote:Holy...I can't wait to compile this baby and start a game, bugs or no bugs, first real PBS system in OTTD!

[OoffTopic]Is it just me, or OpenTTD has almost caught up with the patch? NewInd. was a big step, PBS is yet another, what's left?[/OffTopic]
Well the recently released(though still in development) restricted signals are being developed for ottd too!!! :) :) :) :)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Patch: another pbs for r11760

Post by DaleStan »

Desolator wrote:[OoffTopic]Is it just me, or OpenTTD has almost caught up with the patch? NewInd. was a big step, PBS is yet another, what's left?[/OffTopic]
You should know better than that!
FooBar wrote:Well, there's still a lot of stuff I'd like to use in Open:
- Snow in temperate
- Custom bridgeheads
- Enhanced tunnel entrances
- And of course PBS, but that's heading in the right direction now!
Off the top of my head:
- Programmable signals
- Routing restrictions
- More configurability
- Reversible money cheat (so I can repay the "loan")
- Cht:Renew
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: Patch: another pbs for r11760

Post by CMircea »

FooBar wrote:
Desolator wrote:first real PBS system in OTTD!
Was the one in the MiniIN not real enough? It worked for me back then.
By 'real' I mean how the signal configuration actually is in RL, and the new proposed PSB system suggests that. Its great to see a patch that actually implements it.
FooBar wrote:
Desolator wrote: [OoffTopic]Is it just me, or OpenTTD has almost caught up with the patch? NewInd. was a big step, PBS is yet another, what's left?[/OffTopic]
Well, there's still a lot of stuff I'd like to use in Open:
- Snow in temperate
AFAIK, that's already possible, not sure if a patch is needed.
FooBar wrote:- Custom bridgeheads
The was a branch, but it needs to be resurrected.
FooBar wrote:- Enhanced tunnel entrances
If that's gonna enter OTTD, I want the track on the tunnel to be the same as normal track, not like in TTDP where it's kinda stone-like.
FooBar wrote:- And of course PBS, but that's heading in the right direction now!
Yep, I love it's working with YAPF. Will you excuse me now, I've got to compile it :)
pshemko
Engineer
Engineer
Posts: 104
Joined: 24 Sep 2004 02:43
Location: Aotearoa (New Zealand)

Re: Patch: another pbs for r11760

Post by pshemko »

Anyone has a version that works with latest svn (11814)?
wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11828

Post by wolfc »

I got another version, but this one I don't like at all. Depots just won't work, because of a lot of ugly things. YAPF doesn't tackle it at all. It leaves it to the signal code.
The main problem is that there are multiple trains on one track going in different directions. Combine this with the fact that a depot is not (really) a signal and you have got a nice problem.
So at some point a lot of trains will stare at a piece of reserved track that can't be handled anymore.
wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11923

Post by wolfc »

0.4 brings more fixes on depot handling. There are still some cases where a train can't reach the depot it has chosen for servicing. This brings the lot to a stand still. I'm not sure how to proceed here. I want trains without reachable destinations to stop (this makes issues with single track and double-way track easier).
I first want to be able to run tracks crash free (trains that is :-P ) with all the basic functionality in place before I start on the tunnels and bridges.
So try to create save games with crashing trains. :twisted:
wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11760

Post by wolfc »

pshemko wrote:...
Bugrit, you're save game causes some nice train crashes. :lol:

The trains won't go over the bridge, because that's currently an invalid path.
And apparently I've miscoded the hack for trains coming out of a depot into an unsignalled route (the terminal). So it's trying to fill platform 2 up with loco's. Somehow this doesn't fit. :mrgreen:
pshemko
Engineer
Engineer
Posts: 104
Joined: 24 Sep 2004 02:43
Location: Aotearoa (New Zealand)

Re: Patch: another pbs for r11923

Post by pshemko »

I'm not sure if leaving the depot should work in version 0.4 but clearly - it doesn't ;-)

Train A slows down before the signal in front of the station:
img4-1.PNG
img4-1.PNG (48.95 KiB) Viewed 2501 times
and gets a green light:
img4-2.PNG
img4-2.PNG (49.31 KiB) Viewed 2500 times
the result is pretty obvious :-)

save game (no grfs) attached
Attachments
pre-crash3.sav
(85.48 KiB) Downloaded 59 times
pshemko
Engineer
Engineer
Posts: 104
Joined: 24 Sep 2004 02:43
Location: Aotearoa (New Zealand)

Re: Patch: another pbs for r11923

Post by pshemko »

The bridges and tunnels still don't work. I've also noticed one more thing - trains seems to prefer a route through a depot instead of a straight one; both train A:
img4-3.PNG
img4-3.PNG (48.94 KiB) Viewed 2480 times
and train B:
img4-4.PNG
img4-4.PNG (59.77 KiB) Viewed 2476 times
save game attached.
Attachments
pre-depot3.sav
(85.98 KiB) Downloaded 57 times
wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11923

Post by wolfc »

pshemko wrote:I'm not sure if leaving the depot should work in version 0.4 but clearly - it doesn't ;-)
Hehe, like I said in the previous post. Leaving a depot into an unsignaled dead-end doesn't work. Either make the signal before the terminal a double on or put a signal right after the depot, before it starts crossing other tracks.
The second is the more realistic approach (albeit realism is a bit far fetched with the current depot mechanism ;-) ), but it completely makes old maps worthless. So I want something that is compatible with the way people are used to signal their tracks. I could leave it as it is now, because your example isn't really the standard (/old) way and the new way should always leave a block-end (/signal) available for trains to stop at.
Let's for the moment say that a depot has all the functions of a main-signal, so I've to fix this problem. (I can't just put a flag on the depot that says green, because the route only applies to a particular train, so I'll do some more hacking.)
pshemko wrote:Train A slows down before the signal in front of the station:
Yes, quite annoying isn't it? :mrgreen: Especially if a train wants to move down a route with a lot of reversed signals.
I think I missed a slowing flag somewhere.
pshemko wrote:the result is pretty obvious :-)

save game (no grfs) attached
Thanks, keep them coming.
pshemko
Engineer
Engineer
Posts: 104
Joined: 24 Sep 2004 02:43
Location: Aotearoa (New Zealand)

Re: Patch: another pbs for r11923

Post by pshemko »

I don't think trains should be allowed to crash into each other if there is a signal between them, even if the layout is wrong. Trains simply should not be able to get into already occupied section of the track.
wolfc
Engineer
Engineer
Posts: 20
Joined: 27 Dec 2007 19:11

Re: Patch: another pbs for r11923

Post by wolfc »

pshemko wrote:I don't think trains should be allowed to crash into each other if there is a signal between them, even if the layout is wrong. Trains simply should not be able to get into already occupied section of the track.
I partially agree. Trains should not exit the depot when it might cause a crash.
But if a train is heading towards a signal facing the opposite direction (because of a force proceed for example) it should not stop (or even slow down) at the signal. It should ignore the signal altogether (just as in real life).

For a later version I might implement something like 'proceed on sight'.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests