Skip to content

Visualization of different pathfinding algorithms using Rust + Macroquad library.

License

Notifications You must be signed in to change notification settings

aleferu/Pathfinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding

Visualization of different pathfinding algorithms using Rust + Macroquad library.

Dependencies

How to build

Normal Rust compilation. Release is better, but it's fast either way.

$ cargo build --release

Run with the following or just run the binary.

$ cargo run --release

How to use

  • Left Click to place a wall in the grid.
  • Right Click to place the goal in the grid.
  • Middle Click to place the start in the grid.
  • Left Shift + Left Click to reset a square in the grid.
  • A Key to run the A* Algorithm (Goal and Start must be placed).
  • D Key to run the Dijkstra Algorithm (Goal and Start must be placed).
  • G Key to run the Greedy Best Algorithm (Goal and Start must be placed).
  • C Key to clear the grid.
  • M Key to generate a random maze.
  • Left and Right Arrow Keys to visualizate how the algorithm worked (deletes walls placed after the algorithm worked).