# Automated Taxiway System

I spent my last couple days of winter break working on an automated taxiway system. For those who don’t know: A taxiway is a series of lines drawn on the tarmac of an airport to guide planes to-and-from the runway and gates. The yellow lines on the ground.

At first I did this with the pathfinding service, but that’s a bit overkill. Plus it means you have to essentially create a negative space in order to create the paths. Since taxiways are made up of a series of lines, I decided to write an algorithm that would instead find all possible paths to the given runway, then choose the shortest one. A little bit of funky code is also in-place to avoid getting caught in an infinite cycle in a closed-path system (which exists in most taxiway systems).

Anyway, the results were nice. I didn’t use any formal pathfinding method (I think), and it seems to figure out complex systems even in just a few milliseconds. Below is a video of a dumbed-down taxiway system featuring a closed-system loop that the algorithm is able to avoid:

Usage code:

``````local taxiway = CompileTaxiway(modelWithLinesInIt)
local path = taxiway:GetPath(startPosition, "RunwayNameInModel")
-- 'path' is a series of Vector3 positions in correct order``````
2 Likes

Are you allowed to use diagonal lines?

Yes. It just takes the lines as segments. I should have added some in that video!

Edit: Screenshot with diagonal piece compiled in and running:

this is eerily similar to my trains thing, where instead of focusing on traveling forwards or backwards, yours is focused on getting to a specific destination.

Not going to lie when I first read this I thought “nice I can catch a cab to places I want to go”

I thought it would be something like push q to whistle for a cab [size=1]i put my Walkman on and I thought night as well kick it[/size] one as it goes by and it would stop, pick you up and ask for your destination before driving you there and calculate the fare.

Although this is still equally as good, nice!

[quote] Not going to lie when I first read this I thought “nice I can catch a cab to places I want to go”

I thought it would be something like push q to whistle for a cab [size=1]i put my Walkman on and I thought night as well kick it[/size] one as it goes by and it would stop, pick you up and ask for your destination before driving you there and calculate the fare.

Although this is still equally as good, nice! [/quote]

Hey, that’d actually be pretty fun to make

Hey how did you find the taxiwat neighbors? I’m trying to create an air traffic control game and some knowledge would be monumental