Skip to content

Luniminex/Astar-Pathfinding-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astar-Pathfinding-Algorithm

A simple implementation and visualization of A* algorithm using C++ with SDL library.

About

In this project you can place starting and ending node on a grid and the algorithm will find the shortest path to that node. You are also able to put blocks which are not traversable and work as obstacles that the algorithm can't pass through.

Visualization

  • White - Default, not visited
  • Dark blue - Starting node
  • Ligh blue - Ending node
  • Black - Obstacles
  • Green - Shortest Path
  • Red - Could not find a path.

Controlos

  • Press left or right mouse button to place a node.
  • Press spacebar to start the algorithm. Works only after start and end node were placed.
  • Press 'g' to cycle through nodes. (start, end, obstacle, default)
  • Press 'r' to reset the grid.

Compilation

You'll need to either compile it yourself or use the premade Makefile.

Example

My Image

About

A simple implementation and visualization of A* algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published