JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section

AI in Game Programming

In practice, the purpose of the AI system in the game engine is to control every aspect of the NPC. For example, within computer games—and not only first-person shooters—the AI must provide the following:

  • Primitive behaviors such as picking up items, pressing switches, using objects, performing purposeful gestures, and so on

  • Movement between areas of the game environment and dealing with obstacles, doors, or platforms

  • Decision making on a higher-level to decide which actions are necessary for the NPC to accomplish its tasks, and in what order

To develop systems capable of providing such control, a minimal amount of technology is necessary. Although standard programming techniques allow the implementation of intelligent NPCs, techniques from the field of AI can provide the following:

  • Elegant solutions for explicit control

  • Technology to support implicit control efficiently

Compared to standard scripting techniques, AI technology can be computationally more efficient and can generate better quality behaviors. Such improvements are possible thanks to various aspects of AI, discussed throughout this book:

  • AI techniques providing functionality such as motor control, pattern recognition, prediction, or approximation

  • Design patterns inserted at a system level to assemble these components together

  • Methodologies used to design and test behaviors within realistic environments

These AI methodologies allow the synthetic characters to come to life, but they also serve a particular purpose in games. Game development has common requirements that need to be taken into account when engineering the AI system. Two properties are important in games:

  • Entertainment— The AI can call upon the skills of human players. This involves providing them with various challenges and testing different abilities with increasing levels of difficulty. The AI also can play on emotions to increase entertainment value. The AI can trigger amazement by arranging cool events, or fright by building scary atmospheres.

  • Believability— The AI characters can improve immersiveness by doing their job in a way that does not distract attention from the mission of the game. As for realism, AI allows each individual NPC to behave in a plausible way that seems logically feasible to human players.

In summary, AI game development is about providing control to NPCs to produce entertainment (assisted by believability or realism). The next chapter takes the engineer's approach, using AI technology to assist in the creation of systems capable of such tasks.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor