Wield your magic

The Tower was my second year major project at AIE where we had 5 months to work on a project with a group of 10 people. Thanks to the collaboration between us, we were able to make this game come to life.

My main task on The Tower was handling the enemy AI. The Tower has two different types of enemies; the Warden, a reanimated suit of armour wielding a sword, and the Keeper, a frail spellcaster who fires ranged magic and teleports away from you.

The main system behind the AI for the two enemies is a state machine system, I did make it so that states are their own classes, and the state machine class automatically handles transitioning and the entry and exiting of states. The use of this class also allows easy stopping and starting of the AI at will, used in our freeze code, immobilising our enemies.

Many of the actions these enemies do is animation driven. This choice was made to allow the player to not feel cheated by any actions made by these enemies, and the results of the actions align with what the player visibly sees. This has the downside that gameplay of the enemies requires altering of the animations, however due to time constraints and limitations of the used engine, this approach was better for our needs.