Train Station Filter for Valid Destinations

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
cazius
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Mar 31, 2016 8:40 pm
Contact:

Train Station Filter for Valid Destinations

Post by cazius »

It would be nice if, when selecting destinations for a train, there would be a one-click filter to only see train stations that are reachable from the track the train is sitting on.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Train Station Filter for Valid Destinations

Post by darkfrei »

+1
As option.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Train Station Filter for Valid Destinations

Post by Tekky »

On larger train networks, it would be a lot of work for the game to apply this filter, because the game would have to attempt to pathfind to every station on the list, in order to see whether it is reachable. This could cause the game to freeze for a few seconds, on larger train networks.

Of course, the game could cache which stations are reachable from which other stations. However, it would be a lot of work for the game to maintain this cache and it would also be a lot of work to program this in the first place. Therefore, I am not sure if it is worth implementing, even if I agree that it would be nice to have.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Train Station Filter for Valid Destinations

Post by darkfrei »

Tekky wrote:On larger train networks, it would be a lot of work for the game to apply this filter, because the game would have to attempt to pathfind to every station on the list, in order to see whether it is reachable. This could cause the game to freeze for a few seconds, on larger train networks.
The same time, that for red/white font in train schedule?

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Train Station Filter for Valid Destinations

Post by Tekky »

darkfrei wrote:The same time, that for red/white font in train schedule?
No, a red station means that it is invalid. This is very easy for the game to determine and can always be done in a lot less than a millisecond.

In contrast to that, pathfinding to all stations at once is a lot more work and could cause a long freeze, if the train network and the number of stations is large.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Train Station Filter for Valid Destinations

Post by Jap2.0 »

Although you only need to test for the stations on the list that are currently visible, and then you can do the others when displayed/in the background over the next few ticks, right?
There are 10 types of people: those who get this joke and those who don't.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Train Station Filter for Valid Destinations

Post by Tekky »

Jap2.0 wrote:Although you only need to test for the stations on the list that are currently visible, and then you can do the others when displayed/in the background over the next few ticks, right?
Yes, that could indeed reduce the length of the freezing significantly.

Post Reply

Return to “Ideas and Suggestions”