Game Development Reference
In-Depth Information
Artificial Intelligence
Artificial Intelligence ( AI ) refers to the intelligence that we code into the creatures in
our game worlds. It is essentially the code that controls the actions of a creature. How
smart this code is determines how smart our creature is. Of course, this concept is
closely linked to path finding as well. Path finding is the process of finding a path that
will allow the creature to reach its intended destination. One path finding algorithm is
the A* algorithm (see http://en.wikipedia.org/wiki/A*_search_algorithm ) .
Of course, we can't process this based on the geometry of the world. It would be too
complicated and take too long. One way of doing this is using waypoints . Waypo-
ints are essentially markers that are scattered about the world in strategic places. For
example, an intersection in several paths will be a good place for a waypoint. The
path-finding code simply finds the nearest waypoint to the creature's current position,
and from there it finds a path from waypoint-to-waypoint that will get it to the desired
destination. This is obviously much simpler and faster than trying to compute a path
based on the actual geometry of the world.
Search WWH ::




Custom Search