This topic is now archived and is closed to further replies.


Pathfinding in staggered map again...

Recommended Posts

i''m using a priority-DFS search for pathfinding, and i still cant find the right "grade" function... (next proccessed node, will have the lowest grade) what i do, is that i give each node a grade, like A*. right now, i''ve transffered all my map coordinates to on-screen ones, cause i cant find a way to calculate the function for them. so right now, my function is : grade = sqr((destx - branchx)*(destx - branchx) + (destx - branchy)*(destx - branchy)) as if i was calculating c^2 = a^2 + b^2 which should give me the distance between the two points if i remember right from my math class. just wondering if theres a better grade/price system, cause it doesnt really give me the realistice path between the two points. and i dont mean to add heuristics for now, just how to find a "natural" path 10x, Gil

Share this post

Link to post
Share on other sites