Antipede

Unity Engine C# Combined Finite State Machine and Behaviour Tree AI Stylized Main Menu Group of 5
View code on Github Download and play from itch.io

Things I Worked On

  • All Ant AI and Models
  • Main Menu Design and Functionality
  • All Accessibility Options
  • Complete Saving and Loading of the Game
  • Performance Profiling and Optimizations

Made as a third-year project with the overall goal of strengthening our ability to properly plan and document the full development process, through the use of core agile principles such as User Stories and Trello.

In order to properly and easily facilitate the implementation of the ants AI, a combined Finite State Machine and Behavour Tree architecture was developed. The overarching core componets of the AI were split up into their own seperate state machine states to allow for easy transitioning between any state at any time. Within the states themselves the behaviour tree structrue was used to facilitate the easy mapping out of the ordered sequence of events that occur.

One unique challenge was in the navigation and movement of the ants as they were required to align themselves correctly to terrain of any angle. Due to this a custom navigation system, using A* Pathfinding and a 3D grid overlayed over the terrain, along with custom collision avoidance using raycasts was developed.

The 5 Ant Types

Neumerous and sometimes carry larvae

Small and fast, but low health

Strong and hits hard, high health

Hits really hard, attaching to the player and exploding

Uses weapons to fire at the player from a range

These ants have a few core states they can be in at any one time:

  • Normal: Follow a pre-set path around the map
  • Shock: Expresse shock at detecting the player
  • Investigation: Seen player and moving towards for the attack, calling for backup occasionally
  • Attack: When very close to the player, initiate the attack sequence
  • Damage: At times, either play the damage animation or flee for a brief period
  • Dead: When run out of health, play the die animation

This project was selected for and shown at UTS during the 2022 autumn Tech Festival