What is A*?

- [Course Educator] One of the most common…pathfinding algorithms used in many games is A Star.…In plain English, A Star is a way to plot the path…from one cell of a grid to another.…This is most commonly associated with a tile map,…or 2D terrain, but can also be applied to 3D games as well.…The algorithm simply works its way through each cell…until it reaches a destination,…or stops when no solution can be achieved.…At its core, A Star pathfinding relies on a data structure…called a graph.…A graph is like a table,…except each cell has a direct reference…to its surrounding neighbors.…

This last part is key,…because we use the relationship…between these connected cells,…which are often referred to as nodes,…to help us traverse the area while avoiding obstacles…and generate out a path from one node,…which is our start position, to another, which is our goal.…Using a graph and node is common…in a lot of pathfinding algorithms, not just A Star.…So that's why we're going to focus on that part…of the problem here.…

Resume Transcript Auto-Scroll

Author

Updated

10/10/2016

Released

12/4/2015

Learn how to move characters and objects from point A to B with this introduction to pathfinding in Unity 5. This training focuses on pathfinding in the 2D world: programming simple ways to connect different locations in 2D games. Jesse Freeman starts by explaining the data structures (graphs and nodes) and the A* pathfinding algorithm: the technology that makes traversal of 2D games possible. Then he shows you how to connect paths in a 2D map, and find the fastest path between two points. You'll also build a simple demo map to illustrate and test the pathfinding logic.