Advertisement

Chase algorithms

Started by September 30, 2003 05:23 PM
0 comments, last by moorphene 21 years, 2 months ago
I am making a 3d game in which the game-play is similar to Pac-Man with the exception that the map is generated in 3d (xyz)space rather than 2d (xy. The problem I am having is trying to find a good example that I can use as a reference for the enemy chase algoritms. I want the enemies to perform the following chase methods: preset chase route, shortest path to player, random route, guard power-up closet to player. If anyone has any good Ideas--I''m listening. I am using DirectX 8.1 SDK and VC++. Thanks!
Well, you need two things:

1. Some way of moving your enemy through a series of waypoints: a path. I would suggest using the Follow Path or Containment steering behaviors. Search for "Craig Reynolds steering behavior"

2. A method for generating the path. You describe several different types. Some you can generate by hand and some randomly. For finding the shortest path to player and to the power-up closest to player you can use a search algorithm such as A* or Dijkstra''s algorithm.



My Website: ai-junkie.com | My Book: AI Techniques for Game Programming

This topic is closed to new replies.

Advertisement