There is now two methods of using the A* pathfinding.
- Creating nodes of equal distance appart in a "grid" accross the screen, any impassable objects created will delete any nodes that are totaly obscured by the object and re-align the surrounding nodes to not point at it.
- Any new impassable object that is created will also create nodes on the corner of that object and will connect to other nodes in line of sight* and should reduce the cpu/memory overheads and allow more units on the screen
Still to do: Add in an option to the options menu to allow the user to change the number of nodes wide and high that will be used for Method 1. of A* this number will effect the speed and accuracy of the pathfinding :)
*oh btw, i would check to see if multi-objects work
Started doing the outline of the write-up, looking good, now just need to start filling it in. Between that and the AI essay
Next thing to do is implement fuzzy logic.
No comments:
Post a Comment