Of No Particular Significance

There was supposed to be something here but you get a dinosaur I drew instead.

You might be here because you're wondering about me. Without elucidating too much: I've been in a really dark place for a while and will be unreachable likely indefinitely, or at least until I can rid myself of this mindset.

Alfred – “Took quite a fall, didn't we, Master Bruce?”
Thomas Wayne – “And why do we fall, Bruce? So we can learn to pick ourselves up.”

Wednesday, August 4, 2010

Introducing moterpolate

After a long hiatus in development I've resumed working on the indie Asteroids remake. This summer has been very productive. I've progressed to the point where I need to design the Artificial Intelligence for the antagonists, human-eating aliens, in my project.

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.

  1. 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.
  2. Dynamic obstacles, asteroids, are present. These need to be circumnavigated.
  3. 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