Journal

Enemy AI system

Posted by:

One of the new improvements that we’ve added in Last Dream II is the enemy AI system which allows enemies to choose their actions based on predetermined conditions. We’ve barely scratched the surface so far, but it was a significant rewrite of the battle system source code to implement the framework to allow for the enemy AI. At this point, we’re only using the enemy AI in one place in the game (the boss of the Knight’s prologue), but it is easy to expand upon the enemy AI with the new framework.

Any battle situation that can be tested for as a ‘true/false’ statement can be used as a condition which will change the set of actions that the enemy will choose from. Enemy AI conditions can also be used to trigger flags to influence conditions outside of battle.

One area where we still need to expand the enemy AI condition system is in AI-based targeting which would allow for enemies to choose their targets based on other conditions (e.g. check for lowest DEF character and target them with a physical attack).