Pathfinding system for Airport Simulator. Best approach?

I need to create a pathfinding system that makes aircrafts move on an airport surface following the yellow tracks. They will also need to go through certain waypoint in order to reach their destination (e.g.: “taxi to holding point D via A, B, and C”).

I’m looking for the best approach.
Can someone point me in the right direction please?

Thank you!

Attachments


Things that I know about (didn’t look deep though):

  • Navmesh + Steering actuator
  • Existing pathfinding implementations: link (outdated?)
  • Some more recent stuff from @Smoking_mirror (this is more of a develog diary than a tutorial, not sure I can use this…)
  • Some more recent stuff from @BluePrintRandom (not sure this is what I need)

Is this like a University assignment, or for a game?

I’ve got a very fast pathfinding system if you wanted to move all the people in the airport, but it’s not very smart. It’s not good for high quality pathfinding, more of a dumb swarm sort of thing. :slight_smile:

What you probably want is just plain A* pathfinding over a navmesh.
Like this:

Your problems though are going to come from the same thing that real aircraft controllers deal with. Congestion.
If you want to guide one airplane around the airport that’s easy enough if you know what you’re doing.
But when you’ve got a whole bunch of planes you’re also going to have to design some sort of priority system.

I did something similar before with RPG characters moving around a dungeon. When a call went out for some agents to move, I gave them a new unique ID from the main script. When moving a big group and checking who should move first I gave them a higher ID the closer they were to their target. When two agents are trying to move to the same node on the nav mesh they compare IDs. the one with a higher ID waits while the lower one moves. If they get stuck they draw new IDs from the main script based on how close they are to the target.

You can see it here:

(skip to the 30 second mark).

There are some other pathfinding solutions you might try, there are thing which are better than A* but it’s a good place to start if you’re not already familiar.

This is part of a European project that will explore the possibility of using Augmented Reality in the Control Tower.

I’ve got a very fast pathfinding system if you wanted to move all the people in the airport, but it’s not very smart. It’s not good for high quality pathfinding, more of a dumb swarm sort of thing. :slight_smile:

For know, we are just focusing on aircrafts and vehicles.

What you probably want is just plain A* pathfinding over a navmesh.
Like this:

This looks exactly as what I’m looking for! Could you provide any file I can dig in? Would be very much appreciated…

Your problems though are going to come from the same thing that real aircraft controllers deal with. Congestion.
If you want to guide one airplane around the airport that’s easy enough if you know what you’re doing.
But when you’ve got a whole bunch of planes you’re also going to have to design some sort of priority system.

This will be up to the Air Traffic Controller, It doesn’t need to be AI (for now)

I did something similar before with RPG characters moving around a dungeon. When a call went out for some agents to move, I gave them a new unique ID from the main script. When moving a big group and checking who should move first I gave them a higher ID the closer they were to their target. When two agents are trying to move to the same node on the nav mesh they compare IDs. the one with a higher ID waits while the lower one moves. If they get stuck they draw new IDs from the main script based on how close they are to the target.

Smart

You can see it here:

(skip to the 30 second mark).

I do not understand this second video. The navigation “grid” is there, but the arrows seem to move freely on the whole surface…

There are some other pathfinding solutions you might try, there are thing which are better than A* but it’s a good place to start if you’re not already familiar.

I know that other algorithms exists. Again, at this stage, I do not worry to much about efficiency as in our case the path will be ultimately controlled by the Air Traffic Controller. I just want the aircraft to reach the final destination via the assigned waypoints.

Thank you very much Smoking_mirror! :smiley:

In both videos the code uses post processing on the path. Although an agent needs the network of nodes to plan their route you don’t normally want to restrict them to the nodes. They can go off grid. If you don’t want that behaviour then it actually becomes much easier.

Not worrying about the plane’s priority makes it easier too, though you might still need some code to stop planes from visiting an occupied node on the grid.

I can put together a little demo maybe tonight if I get time…

To have a grid that the aircrafts should follow (yellow lines in the airport picture) is actually what we need for now. Free movement might be needed for ground vehicles although i’m not sure at this stage of the project…

Not worrying about the plane’s priority makes it easier too, though you might still need some code to stop planes from visiting an occupied node on the grid.

If two aircrafts are going to collide at a certain node it would be up to the Air Traffic Controller to solve the conflict in advance.

I can put together a little demo maybe tonight if I get time…

I don’t want to bother you to much. Something that you already have would be probably enough. I just need you to point me in the right direction. I’m looking forward to learn :D:rolleyes:

Here’s the Blend File from the first video above.

movement_demo.blend (1.69 MB)

It’s not exactly what you’re looking for, but all the elements you might need are in there.
If you know what you’re doing you should be able to dig out the stuff you need.

The demo includes code for agents who are not locked to the grid, you don’t really need that.
It runs the A* routine in a thread, so with large detailed maps there wouldn’t be any lock-up or lag but it would take a small delay before the path is calculated. From the look of your map you don’t need that either.

It doesn’t have support for multi part routes, but you can do that just by setting the end of the old route as the start of the new route and appending the route instead of replacing it. So if you click point a, b and c it would go via those locations to get to d.

I’ll look into that and let you know. Thanks! (might take a while :D)