Saturday, 12 April 2008

A* Finished

Wooo A* pathfinding has finished being implemented wooo
There is now two methods of using the A* pathfinding.
  1. 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.
  2. 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
At each stage of the walk though the nodes, a check is made to see if the next node is in line of sight, if so the current node is missed out, then the next node is checked (althought i think this breaks waypoints :()

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: