I know I have not written for a while, but thats basically because I had nothing new to say =P.
CelGraph is finished and it appears to be working correctly, however there are still some tests to be made.
Now, when I was testing it in a graph application I noticed how hard it was to create a path, call the graph, then call
pcsteer to follow that path and... you get the point.
So i created PcPathfinder, this class has similar functions to pcsteer (in fact it behaves very similar):
Seek will seek a position in the world using the graph, this way entities will be smarter to use certain paths instead of crashing against walls.
Pursue will do the same except that it will continue running A* in case the target has modified its position (as you can see this costs a lot)
Wander will use a function call RandomPath(int distance) in CelGraph which will create a random path of deepness distance ie: a random path with distance nodes.
Follow Cyclic Path will follow the indicated path and it will start over again once it reaches the end.
Follow One way Path will follow the indicated path and it will stop at the end.
Follow Two Way Path will follow the indicated path and it will follow it backwards once it reaches the end.
I thought these three functions may be useful for developers in case they want to set certain paths for there entities (guards for example may use this).
Finally I am thinging of adding a multiplier (float) property to edges.
Well, for the moment the cost between two edges is always the euclidean distance between them. But this will cause serious problems in games where you move slower in the mud or grass, etc. So, I will add this property, it will be 1.0 by default and it could be changed by the user with a SetMultiplier function.
Well, this is all for now, pcPathFinder still have bugs so Ill be working in this during the next week or so =)
|<< <||> >>|