Help with Train Pathfinding, Stations and Signals

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
dJP
Engineer
Engineer
Posts: 7
Joined: 26 Mar 2004 03:53
Location: Melbourne, Australia
Contact:

Help with Train Pathfinding, Stations and Signals

Post by dJP »

Are there problems with Train Stations / Signal / Route Finding procedures in OTTD 0.3.1 or am I just doing something wrong?

Example:

If I have a multi platform Train Station with signals at either end, Trains that enter from the east with orders to return to the east, leave the station to the west (in the direction that they were heading originally). They continue on in that direction until they find a U Turn (or a Depot) and then return via a different platform! :?

Shouldn't the trains be about facing on the spot and waiting at the signals? Is there something I should be doing with Pre-Signals to avoid this time waster?

If that made any sense does anyone have any ideas?
MrFrans
Engineer
Engineer
Posts: 59
Joined: 10 Apr 2004 15:06
Location: The Netherlands
Contact:

Post by MrFrans »

Look at your diffuculty settings. :)
Attachments
settings.JPG
settings.JPG (27.43 KiB) Viewed 3527 times
"A script is what you give the actors. A program is what you give the audience."
-Larry Wall
User avatar
dJP
Engineer
Engineer
Posts: 7
Joined: 26 Mar 2004 03:53
Location: Melbourne, Australia
Contact:

Post by dJP »

There's no problem there, I've got at the end of lines and at stations set. Sometimes they reverse at stations other times they don't.

Here'a Screenshot of what I'm talking about. The train performing a U turn should have just reversed in the platform that it came from and waited at the signals.
Attachments
trainreversing.gif
trainreversing.gif (94.76 KiB) Viewed 3199 times
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

dJP wrote:There's no problem there, I've got at the end of lines and at stations set. Sometimes they reverse at stations other times they don't.

Here'a Screenshot of what I'm talking about. The train performing a U turn should have just reversed in the platform that it came from and waited at the signals.
it is not reversing at the end of line ... nor at the station .... if you want to force train going straight ... just put waypoint after the station
what are you looking at? it's a signature!
User avatar
dJP
Engineer
Engineer
Posts: 7
Joined: 26 Mar 2004 03:53
Location: Melbourne, Australia
Contact:

Post by dJP »

SHADOW-XIII wrote:
dJP wrote:There's no problem there, I've got at the end of lines and at stations set. Sometimes they reverse at stations other times they don't.

Here'a Screenshot of what I'm talking about. The train performing a U turn should have just reversed in the platform that it came from and waited at the signals.
it is not reversing at the end of line ... nor at the station .... if you want to force train going straight ... just put waypoint after the station
I don't mind work arounds but in the situation of the screenshot I posted earlier I'd have to have checkpoints on every platform and allocate platforms to trains. The problem there is that I have more trains than platforms and I'd end up with train confusion if two trains which were assigned the same checkpoint arrived at the station at the same time.

I guess it's just a pathfinding issue that I'll have to deal with :(
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Post by dominik81 »

I think the train leaves to that side, because the signal is red on the other side.
User avatar
dJP
Engineer
Engineer
Posts: 7
Joined: 26 Mar 2004 03:53
Location: Melbourne, Australia
Contact:

Post by dJP »

dominik81 wrote:I think the train leaves to that side, because the signal is red on the other side.
You're probably right. It must see the Green Signal and U Turn behind it as an alternative route to it's destination since it's not really too far out of it's way. I guess the problem is that the pathfinding algo doesn't scan for signals further down the line or something. hmm... I wonder if the problem would exist if the lines were split earlier rather than just before the station... :?
mike[F]
Traffic Manager
Traffic Manager
Posts: 232
Joined: 26 Mar 2004 18:56

Post by mike[F] »

Simple solution is to redesign your station so that it's either 100% Ro-Ro, or that trains that terminate there go onto terminus tracks.
-mike[F]
Caught in the rush of the crowd, lost in a wall of sound...
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 26 guests