|
-
Apr 28th, 2001, 05:44 AM
#1
Thread Starter
Addicted Member
Pathfinding
Hi,
I have some knowledge of pathfinding - I sortof know about Dijistra's (is that his name?) method, as I just learnt this at school. It's quite easy.
However, I can't figure out how to implement it into a game... A friend of mine wrote me some VB pathfinding code for use in a turnbased game, which was based around the cost of moving to certain tiles in points, and the points the player had (the game was like XCom).
However, now all I need is a very simple pathfinder. It has to get from one point to another, and avoid obstacles. That's it. Simple. I have a map set up as an array (Map(20,20) as Integer) - a grass/passable tile has the value of 1, and a solid tile has a value of 2.
I tried to modify my friend's code, but it doesn't work... I just can't figure out how he wrote it, and when I simplified it, it screwed up.
Any help would be GREATLY appreciated. =) (especially if you can provide some source code!)
Thanks,
-Git
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|