Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liraymond04/olc-dijkstra
GUI implementation of Dijkstra's shortest path algorithm in the olcPixelGameEngine.
https://github.com/liraymond04/olc-dijkstra
algorithm algorithms-and-data-structures c-plus-plus cpp dijkstra dijkstra-algorithm dijkstra-shortest-path gui olc olcpixelgameengine pge
Last synced: 8 days ago
JSON representation
GUI implementation of Dijkstra's shortest path algorithm in the olcPixelGameEngine.
- Host: GitHub
- URL: https://github.com/liraymond04/olc-dijkstra
- Owner: liraymond04
- License: other
- Created: 2022-03-02T21:17:43.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-27T03:10:46.000Z (about 1 year ago)
- Last Synced: 2025-01-19T13:17:04.780Z (11 days ago)
- Topics: algorithm, algorithms-and-data-structures, c-plus-plus, cpp, dijkstra, dijkstra-algorithm, dijkstra-shortest-path, gui, olc, olcpixelgameengine, pge
- Language: C++
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# olc-dijkstra
GUI implementation of Dijkstra's shortest path algorithm in the olcPixelGameEngine.
![dijkstra](https://user-images.githubusercontent.com/39678448/184523029-138e6915-8f88-4b95-a595-20350363bdbf.gif)
## Controls
| Button | Action |
| ----------- | ----------- |
| Esc | Quit |
| Shift + Left click | Create node |
| Ctrl + Left click | Move node |
| Left click | Create edge |
| = | Increase edge weight |
| - | Decrease edge weight |
| D + Left click | Delete node/edge |
| S + Left click | Select start node |
| E + Left click | Select end node |
| Enter | Play shortest path |## Building
Building is based on Moros1138's [pge-template-project](https://github.com/Moros1138/pge-template-project) CMake files
### Arch Linux
Install the required packages with the following command
`sudo pacman -Sy base-devel cmake git libpng mesa`
Generate project makefiles with CMake
`cmake .`
And build the project
`make`
### Windows
Install a C++ compiler like [MinGW](https://sourceforge.net/projects/mingw/)
Generate project makefiles with CMake
`cmake . -G "MinGW Makefiles"`
And build the project
`mingw32-make`