Skip to content

09. A Star Pathfinding

John Seung Youp Baek edited this page Oct 26, 2017 · 2 revisions

Intro

Visualizes A Star Pathfinding in 2D grid.

Preview (Click GIF to view on Youtube)

A Star Preview

Reference

This is the Reference I used for. My code is slightly modded and implemented in different way.
The algorithm is well known enough to not explain anything here. There are tons of reference you can find on Google.

Auto/Step mode

Press ENTER to run pathfinding algorithm.
Press LEFT SHIFT + ENTER to run pathfinding algorithm step by step.

Blocks (Obstacle)

You can add blocks in grid.
LEFT CLICK on cell to toggle block.
Press B to randomize block on grid. This doesn't guarantee the viable path from start to end.