May 23, 2012, 12:07:31 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: True Pathfinding ?  (Read 627 times)
acocq
Full Member
***
Posts: 164



View Profile
« on: January 06, 2009, 09:02:41 AM »


From everything I have been able to research thus far, GC allows me to easily have a character follow a path (from point to point).

But is there anything included in terms of "route planing" ?  By this I mean the ability for a NPC to find his own way around the level (using a navigation grid and an A* algorithm - or D* or better yet a CD*).

I think that for any reasonable AI, you would need such capability ... and since this isn't so game specific, I would find it reasonable to include it as a standard functionality.

Cheers,
Andreas
Logged

__________________________
Easy to use ... is easy to say ! Wink
gekido
Guest
« Reply #1 on: January 08, 2009, 06:00:18 PM »

The pathfinding that we have implemented IS 'true pathfinding' - what you are looking for is more open-world navigation, which is definitely something that we've discussed and is on our to do list of features to add.  Only certain types of games require this kind of AI however (mainly RTS style games) so it was a bit of a lower priority than simply getting the current path-based navigation implemented.

Most games, even ones with larger environments, setup paths similar to how we're implementing it currently.  Using the road system, plotting paths for urban environments (as an example) is pretty simple.
Logged
acocq
Full Member
***
Posts: 164



View Profile
« Reply #2 on: January 09, 2009, 04:18:06 AM »

gekido,
sorry if I'm not precise with my wording (I would have classified GC's implementation as "path following", but that may be a misnomer).

Even in a FPS (i.e. not an open-world navigation), this type of navigation would be very, very helpful ... that way a Bot(NPC) could react to the fact that the mean and nasty player has blocked a passage way by blowing it up (after all, what are physics for  Grin)  and the bot could find an alternative way quickly - key here is the reaction to changes in the environment when waypoints that were previously reachable are no longer viable waypoints.

In any event, I'm glad to see that you guys have discussed it and already decided that it is worthwhile for some future version. Maybe my ramblings about this helps move it up on the list of priorities  Wink

Cheers,
Andreas
Logged

__________________________
Easy to use ... is easy to say ! Wink
gekido
Guest
« Reply #3 on: January 15, 2009, 09:45:11 PM »

AI objects do have path finding capabiltiies - if you setup a complex path network in your world and simply call 'MoveAlongPathTo' a specific destination - they will navigate the path and get to the destination.  This is pathfinding, pure and simple.

What you are looking for is different, and starts to become fairly game-specific.  By setting up specific pathpoints with different 'types', you can script this kind of logic into your controllers - for example have certain path types set as 'cover points' or 'weapon spawn locations' and then setup bots to gravitate towards these locations.  what exactly the AI does and how they navigate is pretty game-specific though, and starts to become beyond the scope of what we will probably provide out of the box.

Open-world navigation however (like your typical A* etc) is a different type of navigation system, but doesn't necessarily solve all of your problems as far as 'route planning' - it simply helps return a valid path on different kinds of environments - at some point you will need to give your pathfollower a brain and setup goals / directions etc for the AI in order to navigate the world.  This is where scripted logic comes in - it probably won't work much differently than the current AI implementation, except the only difference will be that there is a new type of navigation mode / system available.
Logged
acocq
Full Member
***
Posts: 164



View Profile
« Reply #4 on: January 16, 2009, 04:24:44 AM »

Gekido,
thanks for your exhaustive answer.

I tried to look up MoveAlongPathTo in the online documentation, but could not find any reference to it (neither under "Pathfinding" nor under "Global Functions" ... could you point me in the right direction ?

I'm sorry, that I don't quite understand the full context of your answer. Do you have an A* algorithm implemented in the "MoveAlongPathTo" routine ? Since even without "open world navigation" you would need an efficient algorithm in order to determine which pathpoints would lead you closest to the final coordinates (all the while taking into account any "dead end" pathpoints) ... and that would be either A* or D* (AFAIK).

Also, what I now think I understand is that the "brains" (e.g. in order to avoid obstacles / respond to changes such as blockages along the path) for the NPC need to be scripted. If my assumption (that the current Pathfinding does not allow for dynamic recalculation of paths) is correct, then I would need to script the following:

a.) An a* algorithm (eventually using the built-in pathpoint system) in order to efficiently calculate a "least cost" route
b.) An awareness script that can determine if obstacles (dynamic or static) are blocking the path
c.) A function to eliminate from the path any edges that are blocked (according to b.) and then performs a new path finding (as in a.)


Does that seem like a sensible approach ?

Cheers,
Andreas

Logged

__________________________
Easy to use ... is easy to say ! Wink
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #5 on: January 16, 2009, 05:07:50 PM »

There's a tutorial on pathfinding. Looks at the player scripts too.

My question is how we can get the AI to choose particular object's paths? For instance, putting two objects with waypoints on them doesn't let the AI move from one object to the next to find its way. If it's told to find an object that's closer to another separate path, it goes to the nearest waypoint and stops. Try copying the ground and waypoints in the tutorial and move a goal over there and see what happens.
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!