Is it possible to visualize planned routes?

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

Moderator: OpenTTD Developers

Post Reply
giantmustache
Engineer
Engineer
Posts: 1
Joined: 28 May 2020 18:46

Is it possible to visualize planned routes?

Post by giantmustache »

I was wondering if there have ever been any thoughts on visualizing planned routes.

For example: I click a train or a vehicle to focus on. Then I click a toggle button to visualize the route it has planned directly on the ground.
Are there any thoughts or even solutions for this?
I know I can see the reserved path until the next signal, but it would be nice to visualize the fully planned route for what it has found now. Also for cars or ships this would be a nice feature.

And otherwise, suppose this would be a new little project. Would it be something that is feasible to implement?
I have development experience, but I haven't dived into the openttd source yet ever.

Thanks for thinking along!

ino
Engineer
Engineer
Posts: 124
Joined: 09 Apr 2017 14:58

Re: Is it possible to visualize planned routes?

Post by ino »

I don't believe there is a solution to this right now, as OpenTTD does not compute the planned route. Vehicle will decide which route to take at the junction, not in advanced.

As for a little project --- if you are fine that the route may not be accurate (the OpenTTD pathfinder do take a red signal as one of its criteria), it's probably not very hard (idk, never touched the pathfinder code). Otherwise, you probably need to write an entirely new pathfinder. Modifying the existing pathfinder will be incompatible with existing game, as a lot of game rely on this behaviour (e.g. select the free track from a very busy multi-track main line)

User avatar
Chrill
Moderator
Moderator
Posts: 15415
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: Is it possible to visualize planned routes?

Post by Chrill »

As ino correctly pointed out, the train adapts its route all the time. Surely, something makes it point in the right direction in the first place, so it could be possible to highlight the Anticipated Route, as long as one is aware it could change depending on traffic. I haven't really considered this a desired feature before, but hey! :)
Image
Newest screenshots published January 9, 2019
Chrill's scenarios:
Archipiélago Hermoso
(Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)

Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 6 guests