Enemy Logic - Basic AI

We have been reading about how to create our level and make it interact with our player, but until now, we haven't learned anything about our enemies. It's time to change that.

We will begin by learning about the basics of enemy AI. Usually, in simple games, enemies' decisions are made by a finite-state machine, which is a simple model of an AI.

In this chapter, we will learn about the following topics:

  • Finite-state machines
  • Understanding states and their transitions
  • Comprehending enemy behaviors in each state
  • Learning how to create a basic AI

Get Hands-On Game Development without Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.