I was wondering what kind of technologies were used in FPS games to move bots around the level. I know the pathfinding is done using waypoints or navigation meshes but how do the bots actually rotate and move over those paths? Is something like opensteer used for that, if so, which particular parts?
|
(Optional) The navigation mesh approach is just an extension of the waypoints approach, that allows "wandering". In other words, you can use your navigation mesh to get back to a waypoint graph, by taking the centroid of each polygon in the navigation mesh. (If you are pre-generating the navigation mesh, you can just store the original source points; this way you don't have to recalculate the centroids later). (Mandatory) Now once you have nothing but a waypoint graph, you need to do a search for the shortest path between A and Z. A is where the entity in question is; it wants to know how to fulfill some goal, and that goal generally has a physical location associated with it, which is Z. Now apply something like the A* algorithm for shortest-path search, to that waypoint graph. The output will be a single linear list of nodes indicating the shortest path to your destination, {A..Z}. Now move your entity: This should be a simple matter of moving your entity along a straight line betwen A->B, B->C etc. to Z. Each time you reach another node in the path, fire off an event (or whatever) and then start moving to the next one until Z is reached. Rotation? Well just like in real life, you turn around to face where you're going, don't you? So have the entity rotate before she heads off toward the next node. You can even begin her moving slowly at first while she's rotating, to look more fluid. |
|||||||
|
|
Here there is a document that explains the AI bot techniques employed in Quake III Arena game |
|||
|
|