Minecraft Transit Railway (Automated trains, planes, and more!)

Minecraft Transit Railway (Automated trains, planes, and more!)

1M Downloads

Track Path Finding Waypoints

SachaStickman opened this issue ยท 9 comments

commented

Is your feature request related to a problem? Please describe.
When you create a train route, you don't actually make the path for where the train goes. You just tell the train which platform it needs to go to before driving to the next assigned platform, and the actual path the train takes between these stops is determined by some sort of pathfinding AI, and unfortunately, this AI can get annoying at times. This is not a problem when your train network is small, but when you have a city-sized train network(In my case, a tram network), you can start to see what I mean. Let me explain.

So I'm trying to create a tram route and want the tram to get from Station A to Station B(see picture for full detail). So in this situation, you would expect the pathfinding AI to choose the quickest way to get from Platform A to Platform B, right? Well, nope. Instead of just going straight towards the station, the tram decides to take the branching path and proceeds to drive around the ENTIRE CITY before coming back to the station it was supposed to go to, like an hour later.

From what I see, instead of choosing the shortest path to the next assigned platform, the AI just chooses the first path it finds, even if there were way shorter and quicker routes it could've taken. This is frustrating because there's no way to change this. The best solution now would be to just delete all the tracks it shouldn't use to restrict where the pathfinding AI can go and then place them down again after the train route has been created, but it's a pain to do this every single time you create a new route or need to edit an old one.

Describe the solution you'd like
The first solution would be to make the pathfinding AI better, but I think it would be better to just give us the option to create the paths ourselves. That way, we would always have the option to do it manually in case the AI, for any reason, fails again.

Additional Information
In case you're asking, all of the tracks are the same speed.

Bildschirmfoto 2023-04-14 um 16 54 47

Perpetrator of the crime:

Bildschirmfoto 2023-04-14 um 17 00 16

commented

It does Take Track Speed at Junctions into Account

commented

I know, but all of the tracks in this example are the same speed(40 km/h)

commented

I know, but all of the tracks in this example are the same speed(40 km/h)

Try Fiddling around with the Speed

commented

I tried that, and the tram route in question did make the right turn. But now every OTHER tram that goes through that junction also started taking that exact turn, even the ones that aren't supposed to. There are too many routes going through that junction for the speed trick to work.

commented

I tried that, and the tram route in question did make the right turn. But now every OTHER tram that goes through that junction also started taking that exact turn, even the ones that aren't supposed to. There are too many routes going through that junction for the speed trick to work.

ok... Try having the Original Route go to new Platforms Via a Separate Right-Of-Way

commented

you can add some useless platforms and set the sleep time to 1 to flush AI's annoying

commented

Eh I'm trying to avoid having to make direct changes to the track layout. You see, the network I'm making is actually a recreation of a real-life city network, and I want to keep it as accurate to the real one as possible. Also, that wouldn't really look visually appealing. I prefer to do this only as a last resort. Can't there be another way to do this?

commented

Eh I'm trying to avoid having to make direct changes to the track layout. You see, the network I'm making is actually a recreation of a real-life city network, and I want to keep it as accurate to the real one as possible. Also, that wouldn't really look visually appealing. I prefer to do this only as a last resort. Can't there be another way to do this?

I have no idea.

commented

Thanks for your feedback, I'm working on a better pathfinding algorithm. Waypoints might come in the future as well, haven't planned that yet.