-
Notifications
You must be signed in to change notification settings - Fork 47
Description
🪶 TL;DR
A GUI-based Pathfinding Visualizer built with C++ and SFML/Qt to visually demonstrate how algorithms like A*, Dijkstra, and BFS explore and find paths in real time. An interactive and educational addition to CodeScript’s visualization toolkit.
📝 Description
I’d like to propose adding a Pathfinding Visualizer (GUI) feature to CodeScript — an interactive C++ module that demonstrates classic pathfinding algorithms like A*, Dijkstra, and Breadth-First Search (BFS) in a visually appealing, real-time environment.
This would be a great educational and interactive addition, allowing users to see how different algorithms explore nodes, find optimal paths, and compare performance.
💡 Concept
The visualizer will display a 2D grid, where:
- Each cell represents an empty space, wall, start node, or target node.
- The user can place or remove walls, set start and end points.
- The algorithm runs step-by-step with animated exploration and final path highlighting.
- The UI updates in real time using SFML or Qt.
🧩 Algorithms to Include
- Breadth-First Search (BFS) — for unweighted grids.
- Dijkstra’s Algorithm — for weighted grids.
- A* (A-Star) — using heuristics for efficient shortest path finding.
🧰 Tech Stack
- Language: C++17 (or later)
- GUI Framework: SFML or Qt (PySide6 equivalent behavior in C++)
- Build System: CMake
⚙️ Core Features
- Adjustable grid size (e.g., 20×20, 50×50)
- Interactive grid editing (add/remove walls, set start/end)
- Step-by-step or auto-play visualization
- Highlighted path output and stats (distance, visited nodes)
- Adjustable animation speed
🎯 Expected Outcome
This feature will:
- Help users visualize how pathfinding algorithms work internally.
- Enhance CodeScript’s learning and visualization toolkit.
- Serve as a reusable C++ module for algorithm demonstrations.
🕒 Estimated Development Time
2–3 days for the base GUI version (with BFS + A*).
Extra time can extend the animation or add weighted support for Dijkstra.
🚀 Future Enhancements
- Diagonal movement options
- Custom node weights (for terrain simulation)
- Pause/Resume and Reset controls
- Algorithm comparison mode
🙋♂️ Contributor Interest
I’d like to take up this feature and implement the GUI-based version first.
Would love input on:
- Framework preference (SFML vs Qt)
- UI style conventions or guidelines CodeScript follows.
Proposed by: Ashlin Jose