Animal AI Implementation - UQcsse3200/2024-studio-1 GitHub Wiki

Technical Documentation on Animal AI Implementation

The animal AI is implemented using a combination of pathfinding, attack patterns, and attribute

Pathfinding:

  • When the player approaches and is in range of the attack, the animal will perform this action in that direction.
  • Pathfinding takes into account environmental obstacles, such as walls and other objects, as well as the positions of other animals to determine the optimal route around the room.
  • Pathfinding is updated in real-time as the player and other animals move, allowing the animals to dynamically adjust their pursuit.

Attack Patterns:

  • Each animal type has a set of predefined attack patterns that they will use based on their attributes and the player's position.
  • Different animals will have different optimal strategies to deal with them while minimising health/resource loss
  • The attack patterns are carefully balanced to provide a challenging, yet fair, experience for the player.

Attribute

  • Each animal will have different values for health, movement speed, armour (which impacts how much damage is taken), weakness( melee or ranged), and associated attack (slow or fast) slow attack does more damage

Extra (TBD):

  • Finding the optimal path for animals that chase the players, to make it more interactive.
  • Attack patterns may also include special abilities, such as the rats/rabbits' "infection" or the Chimera's area-of-effect attacks.
  • Certain animals, such as the final boss , will have unique special abilities that set them apart from the standard enemy types.
  • These abilities may include the power to control or summon other animals, the capacity to temporarily disable the player's actions, or even environmental manipulation, such as the ability to destroy obstacles.
  • Special abilities are designed to force the player to adapt their strategies and utilise all the tools at their disposal to overcome these formidable opponents.
  • Maybe Add animals use ranged weapons in the future?