The Daily Click ::. Forums ::. Klik Coding Help ::. Pathfinding
 

Post Reply  Post Oekaki 
 

Posted By Message

Deleted User
3rd January, 2009 at 16:51:46 -

I'm trying to figure out what method works best for myself, but I think I need a little direction. I'd like to try the pathfinding object, but it seems like there really isn't any material on how to use it. Is it any good? If not, what is.

 

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1969

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd January, 2009 at 17:21:42 -

It depends a lot on what your game is like - we need more information...

* is it top-down / platform / grid-based / realtime / turn-based / etc?
* how many objects to you need pathfinding for?
* do you need the shortest path? (and if so, do different terrains affect speed?)
* do you just want objects to be able to steer around an obstacle or move towards a player? (not technically pathfinding at all)

Advanced Pathfinding Extension is for grid-based games (though grid can be hidden). It's quite powerful, and can find the shortest route between two grid cells, and take into account terrain "weights". It is however, going to be quite difficult and confusing to use if you haven't done much with grids/tiles/arrays etc before.

 
n/a

Deleted User
3rd January, 2009 at 18:09:38 -

Oops, sorry. I usually include better details.

It's a top down style shooter, and the pathfinding is basically for the enemies. I basically want them to comb the area searching for the player and then be able to follow the player when they're close enough. I've got the detection down, but I really don't know the first thing about making them avoid obstacles. Then I also need a system for the players allies to be able to take orders such as go to this location, follow, stay put or do a search and destroy mode like the enemies.

As far as arrays and grids go, I work very well with them. I just need to know where to start with the extension.

 

Deleted User
4th January, 2009 at 00:00:17 -

Uh oh. I guess it's real stinkin complicated, huh?

 

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
4th January, 2009 at 00:28:54 -

I haven't got any experience with the extension, so I really have no idea about what it does and it's limits. If you want to have enemies avoid obstacles, the easiest way is to have a pair of antennae for them that can tell them they are going to walk into an object on the right or left.

\ /
Object

If the object is facing north, the antennae must face north-east and north-west. If the northwest (left) one hits an obstacle, have the object add + 1 to it's direction (or something like that). Similarly, if the northeast (right) antenna hits an object, have the object subtract from it's direction. I hope that makes sense.

Depends on how many enemies you are using, this may or may not be an acceptable way to code it. I would suggest spreading values and having all their separate detectors and so forth stick to each unique ID'd enemy.

 
n/a

Deleted User
4th January, 2009 at 00:37:21 -

That seems pretty simple and it gives me some ideas that I'll tinker around with some ideas. I'd still like to hear some other suggestions.

 
   

Post Reply



 



Advertisement

Worth A Click