| Click to view demo. |
Part of the duty of the AI is dictating the motion of an alien. Now I don't want some inebriated AI or one that seems retarded. I need something sophisticated. After researching some common planning techniques (waypoints, visibility graphs) used in games to tackle this problem I decided to make my own library because the ones I came across were inadequate for the environment in my game. Here's why.
- We're in space. There is no friction in space. This prevents the use of simple local methods (e.g. always propel yourself towards the destination) to move about. The majority of the path planning methods assume complete control over your game object's motion.
- Dynamic obstacles, asteroids, are present. These need to be circumnavigated.
- Kino-dynamic (nonholonomic) constraints. The particular AI physically is described as having one thruster which can fire at any angle (360 degrees).
At this point I've found and implemented a path finding algorithm that satisfies two of the three criteria. It's called Discrete Search Leading Continuous Exploration for Kinodynamic Motion Planning. It is very flexible and is able to handle any constraints like those appearing in unicycles, bicycles, and conveniently ... alien spaceships.
Moterpolate is an open-source library for motion planning (motion interpolation hence the name moterpolate) for game AI. DSLX is what the library is built upon. At this point it lacks the ability to handle dynamic obstacles but I plan on implementing that soon. I also plan to integrate some other improvements into my game (like real-time path deformation) and perhaps the library if possible.
No comments:
Post a Comment