View Single Post
Re: what's your pathwalking algorithm
Old
  (#6)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: what's your pathwalking algorithm - 05-01-2004

Hmm I'm using A* algorithm for finding paths.
My bots are auto-waypointing, cause my task is to develop an "highly intelligent" 8D bots and navmeshes are cheating IMO because bot's will create them from map file and not from "seeing" and "exploring"

After path is found, it is returned in array (array of pointers to my CWaypoint class). Bot than go to first waypoint in array (actually last waypoint, cause path is upside down in my array) and when he came there, he goes to another waypoint in array.
I have a FIFO stack in bot's "Navigation Cognitive subsystem" and I place there tasks what bot should do (go there, connect this waypoint with this, create waypoint there) and one of task is GOPATH which is : take first waypoint from path, go there and place new GOPATH task into stack where new path does not have waypoint you are going to now. o_O

My bot auto-waypoined de_aztec an created about 800 waypoint (this is early stage of my auto-waypointing technique, I plan to reduce count of waypoints to max 500 (by merging waypoints into larger). With this waypoint count, 'random' A* pathfinding never took more than 15ms (I was checking this by ::GetTickCount() windows API function. It was either 0 or 15, strange ) I want to ask those who work with A* if this is fast or slow.

The path can't fail (It stands and falls on waypoints). If it fails from whatever reason (example New Round while bot walking along path) my stack in navigation subsystem is 'flushed' so path is forgotten.

-- Jozef Wagner


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)

Last edited by koraX; 05-01-2004 at 19:06..
  
Reply With Quote