1. 12
  1.  

  2. 1

    (plug) Long ago, when I couldn’t find a A* library that I like (lightweight, few files, no dynamic memory allocation), I made one in pure C: https://github.com/felselva/uastar

    Might be useful to someone.

    The test unit give results like this:

    ./test 70 1241 0 1 10 13 14 14
    passable chance: 70.0
                Start: S (or s if fall in a wall)
                  End: E (or e if fall in a wall)
                 Path: *
           unpassable: O
    Map:
     ============================= 
    |           O       O       O |
    | S O           O     O       |
    | * O     O O     O   O O O   |
    | * * * * * O O   O         O |
    |   O     * * * * * *         |
    | O     O O O     O *   O O   |
    |   O   O         O *   O O   |
    |   O     O   O O   * O       |
    | O     O       O   * O       |
    | O O       O O     * *       |
    | O   O             O *       |
    |       O     O O     * O O   |
    | O   O O       O   O *     O |
    | O         O         E   O   |
     ============================= 
    A path was found!
    
    

    Stories with similar links:

    1. Pathfinding for Tower Defense via pushcx 5 years ago | 11 points | no comments