YAPP - Yet Another PBS Patch (now in trunk!)

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

Post Reply
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Timitry »

then get winrar... should be about 2mb size... or another program which can open rars, you will always have the need to open rar files as they are quite common...
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: YAPP - Yet Another PBS Patch

Post by T-Unit »

Done. Testing can begin. I didnt start well by letting a couple of trains run into each other...
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Timitry »

Yeah, if editing any section with PBS, you should better first kill all tracks leading to that junction, edit like you want, then reconnect everything... Else there will always be crashes...
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: YAPP - Yet Another PBS Patch

Post by Tekky »

T-Unit wrote:Done. Testing can begin. I didnt start well by letting a couple of trains run into each other...
Hehe, that happened to me, too :) The most important rule is to put signals in front of all station platforms to prevent trains leaving a station platform without clearance, as that is the most frequent cause of a crash. Also, you should not change a signal that a train has reserved a path to, otherwise it will just continue driving on although it has no clearance to do so. I suggest you run the game with "openttd.exe -d pbs=2" in order to see all reserved PBS paths. Also, I really recommend you don't mix the new PBS signals with the old traditional signals.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: YAPP - Yet Another PBS Patch

Post by planetmaker »

Hi,

great patch as I've been playing around with today. Much to learn (new) wrt to signaling, but fine :)

Two bugs I found though, one minor, one major:
minor: with debug_level pbs=2 the reserved path is not shown on slopes (yapp_NoPathOnSlope.png).
major, leading to possible train crashes (see yapp_NoPathReservedWrongDirection.png): newly build trains, which have to reverse at a station don't reserve a path in the PBS signaled entrance. You can see this happen in the attached save in a few seconds. See sign !power station.

Good work though :)

EDIT: Just found on flyspray this bug report: http://bugs.openttd.org/task/1473
Maybe this is related...
EDIT2: fixed type; thanks to audigex.
EDIT3: the slope image actually isn't supposed to show a highlighted track tile. The bug nevertheless works for slope tiles w/o signals which should be highlightes. Thx Tim for pointing out.
(Obviously it's already too late for me... )
Attachments
Reserved track not shown properly on slopes
Reserved track not shown properly on slopes
yapp_NoPathOnSlope.png (15.82 KiB) Viewed 4250 times
Train moving through PBS tracks without reserved track tiles.
Train moving through PBS tracks without reserved track tiles.
yapp_NoPathReservedWrongDestination.png (31.37 KiB) Viewed 4249 times
Coop Transport, 6. Jul 1992.sav
save game where the train from the depot will cause very soon a nice crash.
(423 KiB) Downloaded 91 times
Last edited by planetmaker on 06 Feb 2008 21:53, edited 1 time in total.
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: YAPP - Yet Another PBS Patch

Post by Tekky »

planetmaker wrote:Two bugs I found though, one minor, one major:
minor: with patch_level pbs=2 the reserved path is not shown on slopes (yapp_NoPathOnSlope.png).
major, leading to possible train crashes (see yapp_NoPathReservedWrongDirection.png): newly build trains, which have to reverse at a station don't reserve a path in the PBS signaled entrance. You can see this happen in the attached save in a few seconds. See sign !power station.
I guess it cannot mark track as reserved on slopes because there is no appropriate "dirty" track sprite defined yet for slopes. Therefore, I would rather call it an "unimplemented feature" and not a "bug".

I had a look at your savegame and I found that the train which causes the crash doesn't reserve its path properly because it cannot find a path to its destination, i.e. it is lost. The issue of lost trains making improper path reservations has already been reported and the patch author has already announced that he would fix this bug in the next release. Thanks for your bug report, anyway.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Michi_cc »

planetmaker wrote: Two bugs I found though, one minor, one major:
minor: with debug_level pbs=2 the reserved path is not shown on slopes (yapp_NoPathOnSlope.png).
This is because OpenTTD doesn't have the proper sprites to overlay in this case. Would need new sprites to work.
planetmaker wrote: major, leading to possible train crashes (see yapp_NoPathReservedWrongDirection.png): newly build trains, which have to reverse at a station don't reserve a path in the PBS signaled entrance. You can see this happen in the attached save in a few seconds. See sign !power station.
The main problem causing the crash will be fixed in the next version. Regarding the bug report on Flyspray, I'll have to check if that is relevant.

Are any TTDPatch players here? I did take a look at mixing normal and PBS signals in Patch and was able to crash trains this way rather easily. (Having both PBS and plain signals as signals into a block.) I did use an older version as the current version wasn't working for me for some reason. So I would be grateful if somebody could clarify what the current Patch does in such a situation.

-- Michael Lutz
-- Michael Lutz
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: YAPP - Yet Another PBS Patch

Post by Zephyris »

Tbh, regardless of how TTDPatch handles mixed signals and PBS signals, i think OpenTTD should never allow crashes due to "incorrect signalling" as expressed before...
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Michi_cc »

Zephyris wrote:Tbh, regardless of how TTDPatch handles mixed signals and PBS signals, i think OpenTTD should never allow crashes due to "incorrect signalling" as expressed before...
Depending on your defintion of incorrect signalling, OpenTTD does allow crashes right now. Is connecting two tracks that were unconnected before without placing signals on the connection incorrect signalling or user error? And if it's an user error, why is building the wrong signal type not an user error? Most people here expressed the opinion that crashes after modifying a junction with trains on it are generally a user error. If you remove a signal in plain OpenTTD, trains will crash. So why should removing a signal be a valid reason for crashes, but changing the signal type not? I'm not trying to discredit your opinion or anything, I just want to know why you think so. Of course, you could be of the opinion that the current behavior is broken as well.

The first problem is to define what incorrect signalling actually is. I think that if you ask five users, you will probably get five slightly different answers. Secondly, every solution for that problem has some kind of drawbacks. The real problem is not finding a solution, it is deciding which drawbacks are acceptable.

I can think of a few solutions that are intuitive and easy for the user, but they all either use map space, which is a scarce resource, or have the possibility to be computationally very expensive.

Another solution would be to automatically upgrade all signals in a block, but two-sided signals pose a problem then. If you convert them as well, conversion would have to cascade into the next block as well which could finally result in converting almost the whole network. And if you don't convert them, nothing is solved.

Please take this post as food for thought. Don't hesitate to post if you have a good idea for a solution.

-- Michael Lutz
-- Michael Lutz
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Timitry »

Wow, we are just testing the pbs at the openttdcoop development server... although it's tricky, it's functionality is amazing... Just look at the picture below :)

in some coopetitive work, we found out that you should not use any entrance signals at all - just don't put any signals in front of the station :)
so just like the picture above just without the entry signals... works really amazing!

[e] even did a two-way roro... works amazing and is really simple - pictures tomorrow!
Attachments
Stresstesting.PNG
Stresstesting.PNG (64.21 KiB) Viewed 1245 times
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Mchl »

Today I managed not to crash any trains... I guess I'm getting used to the new system :D

Screenshot shows 4 platform ro-ro station, with three entering lines and three leaving lines... The design itself is really simple and works really well.

No congestions so far. I am trying to put as much load on it as possible. There are several unconnected coal mines still available :D
Attachments
Keningworth Falls Transport, 25th Sep 1940.png
Keningworth Falls Transport, 25th Sep 1940.png (228.52 KiB) Viewed 1164 times
RMJ
Traffic Manager
Traffic Manager
Posts: 160
Joined: 24 Sep 2005 13:52
Location: Denmark
Contact:

Re: YAPP - Yet Another PBS Patch

Post by RMJ »

its alittle bit sad you have to be a damn guru :( to try out these nice patches, anyone that would be so kind to compile this

//Thanks
Feel free to join my server on 90.185.50.242. its coop, meaning 1 company to dominate the whole map :) its more random and not as pro as the Openttd Coop guys.
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Mchl »

Timitry has posted Win32 binary on page 5 of this topic.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: YAPP - Yet Another PBS Patch

Post by WWTBAM »

About how ttdpatch handles mixed signal types, ie non PBS and PBS it converts the non PBS signals to PBS once the last train has left the signal block. If the signal was presignal it keeps it as a prePBS.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
spaceman-spiff
Retired Moderator
Retired Moderator
Posts: 20634
Joined: 28 Jul 2002 07:08
Location: Belgium
Contact:

Re: YAPP - Yet Another PBS Patch

Post by spaceman-spiff »

Timitry wrote:Here comes a compiled version, compiled and working under win xp... Install over a nightly around the patch version, e.g. 12069...
Hope that works...
We had one complaint about your file, it appears to have some ttd original files in it, is this allowed ? Can someone make this clearer ?
Last edited by peter1138 on 07 Feb 2008 08:07, edited 1 time in total.
Reason: Removal of copyright infringing link
Well, back to work, lot's of it in the near future
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: YAPP - Yet Another PBS Patch

Post by DaleStan »

Distribution of TTD's original files is prohibited in the OpenTTD forums.
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
Forked
Engineer
Engineer
Posts: 43
Joined: 13 Jan 2008 20:36

Re: YAPP - Yet Another PBS Patch

Post by Forked »

http://www.skagset.no/openttd/r12072_yapp_v3_win32.rar

took the svn-friendly filed and compiled with buildottd. It failed against latest rev (I'm a bit stressed before work, so didn't see against what file) but compiled fine against latest nightly rev.

This file does not contain the grfs from TTD.

Remember to never trust any executable file from people you don't know (and those you do know..), but I promise I didn't mess around with anything :)

edit: I didn't upload the source code to the same location .. I hope I'm not in some huge violation of licensing.
Scay
Engineer
Engineer
Posts: 39
Joined: 30 May 2004 20:48

Re: YAPP - Yet Another PBS Patch

Post by Scay »

Thanks for the build! Don't need original newgrf-files since I got them myself, just have the problem of actually compiling it. I'm trusting NOD32 to keep everything really bad out of the way for me ;)
paradigm
Engineer
Engineer
Posts: 8
Joined: 07 Feb 2008 13:18

Re: YAPP - Yet Another PBS Patch

Post by paradigm »

First, great patch, I really was waiting for someone to implement this after reading about it on the wiki. I played around a bit and it works pretty well so far. It feels very natural to use and looks and behaves just way more realistic. Thanks a lot!

Now, during testing I encountered some "weird" behaviour: I had a train going from one stating to another and there were two possible routes to it, one short and pretty straight and another significantly longer. The train, no matter how, always chose the longer route.

See the attached screenshot for an example (it isn't as clear a it could be, but I was just experimenting a lot :) ). The train always choses the red route, while the green route would be far better.

I couldn't explain why this was happening until I read about the fact, that trains will avoid driving through a signal from behind. This is probably desireable in some (or many?) cases, but on the other hand it should not force a train to use a significantly longer route. I think this could be easily "fixed" either by reducing the penalty for driving through a signal from the other direction or by introducing (yet) another signal which doesn't has a penalty at all (or really low penalty).
Attachments
Train on its way to Dresden Ost
Train on its way to Dresden Ost
train_to_dresdenost.png (76.58 KiB) Viewed 1132 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: YAPP - Yet Another PBS Patch

Post by planetmaker »

paradigm wrote:First, great patch, I really was waiting for someone to implement this after reading about it on the wiki. I played around a bit and it works pretty well so far. It feels very natural to use and looks and behaves just way more realistic. Thanks a lot!

Now, during testing I encountered some "weird" behaviour: I had a train going from one stating to another and there were two possible routes to it, one short and pretty straight and another significantly longer. The train, no matter how, always chose the longer route.
My experience and experimenting tells me that a train prefers a one-way route over a two-way regardless of length of the two, if both lead to the desired destination.

Your long route uses a one-way signal as entrance, the short way doesn't and is omni-directional.

I wouldn't call this a bug, but a feature :P

EDIT: clearified a bit.
Post Reply

Return to “OpenTTD Development”

Who is online

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