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