🌟 A-star Path-finding application 🌟
A simple templated binary search tree implementation
Not much to know :
- Right-click to add non-walkable cells.
- Left-click to add a starting/ending point.
- Enter to run the algorithm.
path_finder is configured using a single JSON file.
An example is provided in conf/default.json
{
    "bindings": {
        "clear": "Space",
        "analyze": "Enter",
        "exit": "Escape",
        "reload": "F5"
    },
    "graphics": {
        "width": 750,
        "height": 750,
        "frame-rate": 60
    },
    "grid": {
        "rows": 25,
        "cols": 25
    },
    "analyzer": {
        "heuristic": "manhattan",
        "allow-diagonals": false  
    }
} Bind actions to specific keys.
| name | description | default value | 
|---|---|---|
| clear | Clear the grid (remove drawn cells) | Space | 
| analyze | Perform an analyze (run A-star algorithm) | Enter | 
| exit | Exit the program | Escape | 
| reload | Reload the programm (apply configuration file changes) | F5 | 
Specify display window settings.
| name | description | default value | 
|---|---|---|
| width | Window width in pixels | 750 | 
| height | Window height in pixels | 750 | 
| framerate | Do not allow more than x frames/s. | 60 | 
Specify grid settings.
| name | description | default value | 
|---|---|---|
| rows | Number of rows | 25 | 
| cols | Window columns | 25 | 
Specify algorithm settings.
- 
heuristic - "manhattan"
- "euclidean"
- "octogonal"
 
- 
allow-diagonals : Allow to move diagonally. 
path_finder has a build-time dependency on SFML.
Please refer to its Documentation for more informations.
path_finder also has a build-time dependency on miniJSON on the form of a submodule. The submodule is automatically updated within the CMake of the project.
Baically, here are the steps you might wanna do (debian example) to compile the project :
- Clone the project
[~] cd ~/git
[~] git clone https://github.com/MericLuc/sfml_path_finder.git- Install dependencies
[~] sudo apt-get update
[~] sudo apt-get install -y libsfml-dev- Create a build folder
[~] mkdir ~/build && cd ~/build- Build the project
[~] cmake -S ~/git/path_finder .
[~] make- Run
[~] ~/build/path_finder -i ~/git/path_finder/conf/default.jsonpath_finder provide an install target.
[~] cmake -S ~/git/path_finder -DCMAKE_PREFIX_INSTALL="/your/install/folder"
[~] make installIt will install the following files :
${CMAKE_INSTALL_PREFIX}/path_finder
        path_finder
        default.json
