Archived

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

stilltjack

Adven. Walking

Recommended Posts

Howdy Folks, I''m working on an adventure game engine (for fun), and am at the point where I''m going to write the algorithm for moving the character around (point and click style). Currently I have the walkable areas stored as polygons, and am using regular polygon point containment alogrithm to check if a point is in the poly. I''m thinking of using A*, breaking down the screen into 25*25 squares, checking if the center point of each square is in the polygon, and assigning weights in that manner. Then, the directions are calculated, put in a queue, and executed. Before I go to all the trouble of writing this, can anybody tell me if this is a good idea (or is there a better one)? thanks, stilltjack

Share this post


Link to post
Share on other sites
I dont know much about pathfinding but try looking at this article: http://www.gamedev.net/reference/programming/features/precalcpath/ From what it sound like that could be a good solution to your problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I agree with Yohumbus. If you just use the polys, and link up the ones you can move between, then using the A* algorithm will work quite well.

Only thing u gotta think about is how you would assign weights to each polyon (and in a point and click, would you need to assign weights, surly they would all have the same weights?), and that the noof polys isnt too large, so the algorithm isnt too slow.

Share this post


Link to post
Share on other sites