https://github.com/kingcitaldo125/pystar
A* pathfinding visualizer in Python/PyGame
https://github.com/kingcitaldo125/pystar
astar-algorithm astar-pathfinding pygame python
Last synced: over 1 year ago
JSON representation
A* pathfinding visualizer in Python/PyGame
- Host: GitHub
- URL: https://github.com/kingcitaldo125/pystar
- Owner: Kingcitaldo125
- License: mit
- Created: 2025-03-30T16:41:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T16:57:20.000Z (over 1 year ago)
- Last Synced: 2025-03-30T17:34:20.906Z (over 1 year ago)
- Topics: astar-algorithm, astar-pathfinding, pygame, python
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyStar
A* pathfinding visualizer done in Python/PyGame.
## Installing
Run
```
pip install -r requirements.txt
```
to install dependencies.
This is mainly just [PyGame](https://www.pygame.org/wiki/GettingStarted).
## Running
Simply run the script with `python astar.py`.
Use the left mouse button to select cells and the right mouse button to modify the terrain on the map.
Click on one cell to mark it as a start cell and a second cell to mark it as the end cell for the search algorithm.
Terrain must be modified prior to making your start/end cell selections.
Press the Spacebar to reset the map.
Press the Escape key to quit.
## References
[PyGame Docs](https://www.pygame.org/docs/)
[A* Pathfinding (E01: algorithm explanation)](https://www.youtube.com/watch?v=-L-WgKMFuhE)