Quote Originally Posted by de_jean_7777 View Post
In my current game project the AI is simple. All entities follow a set of actions. When an action is complete it goes on to the next action in the list. Some actions have simple decision making, which can result in jumping to another action (a random chance or so) The action state is stored individually for each entity. Actions can be chained, so they are performed simultaneously (e.g. following a path, and firing projectiles at the same time, while making a decision to change paths). With time I expand the number of action types, for now it's: path following, waiting at a point, teleporting to a point, and firing projectiles, timer to go on to next action, and random chance to go on to next action (a sort of random behavior at certain points). This is sort of simple scripting with limited number of actions, and works well enough for a simple top-down scrolling space shooter. I also intend to make some actions situation aware, like projectile firing, so that the enemies don't fire too many projectiles and swamp the player. The actions are configurable to a certain extent. The most tiring part is coding all the action lists and configuring them, so I made some helper functions and predefined actions to help.
Sounds very cool! I don't suppose you could share some code snip-its or something?