Chapter 6. AI and Pathfinding
A good RPG requires some enemies and, therefore, their AI. In this chapter, we will create an enemy script in order to understand the basics of AI in RPGs.
In particular, we will learn about pathfinding and how this can be used to create our enemy character. The following is what we will go through:
- Pathfinding
- The AStar Algorithm
- Using pathfinding for enemies
In the previous chapter, we worked on our player and designed the game level. Now we need to learn how to add enemy characters to our game.