All projects

2025

Graph Pathfinding Visualizer

Interactive C++/SFML visualizer for Dijkstra's, A*, and BFS on randomly generated weighted graphs.

Not currently deployed
C++SFMLDijkstraA*BFSMST

About

A desktop pathfinding visualizer built in C++ with SFML. Generates random weighted graphs, then animates Dijkstra's, A*, and BFS step-by-step - showing visited nodes, the final path, and the minimum spanning tree. Press R to regenerate a new graph instantly.

Why I built it

I wanted to actually see graph algorithms run, not just trace them on paper. Building it in C++ with SFML forced me to handle rendering, state, and animation timing myself - which made the algorithms click in a way no textbook did.

Highlights

  • Step-by-step animation of Dijkstra's, A*, and BFS
  • Randomly generated weighted graphs with instant regenerate
  • Visualizes visited nodes, final path, and minimum spanning tree

Screenshots

2 images

Randomly generated weighted graph
Random weighted graph on launch
Pathfinding result with visited nodes and final path
Visited nodes (yellow), final path (red/green endpoints)