Introducing AI movement
When it comes to moving AI entities in a virtual environment, we face numerous challenges, and there is no universal solution. The approach to solving each problem depends on each unique characteristic that will be faced in the type of game being developed. For example, is the AI’s destination something stationary – for instance, a pickup – or is it something that is moving unpredictably, such as the player character? Furthermore, will the AI just need to wander around without a specific destination, or will it have a pre-defined pattern – for instance, as a patrolling sentinel?
Also, as a developer, you will need to consider factors such as different terrains, obstacles, and dangerous zones. Deciding between an easier or a more dangerous – but quicker – path can have a significant impact at runtime. These are just a few of the considerations involved in moving AIs within a level and, as you encounter different scenarios...