
5min read
Anomaly Cleanup Squad
This game was developed as a 3D top-down tactical RTS shooter for a university game development course, created as a team of four. The concept was inspired by the Door Kickers franchise, with a focus on tension, planning, and high-stakes decision-making.
The player commands a squad of four soldiers through a thermal drone camera, completing objectives in hostile territory. A lethal alien-like specimen roams the environment, hunting the player's units with stealth, intelligence, and speed. It reduces its thermal footprint by hiding in forests and ambushing soldiers, forcing players to balance caution and momentum. Soldiers auto-engage on sight, but poor positioning can lead to friendly fire, reinforcing the high-pressure tactical gameplay.
My primary responsibility was the design and implementation of the enemy AI. I focused on creating intelligent, reactive, and suspense-driven behaviour that would challenge players and evoke the tension seen in Alien: Isolation.
AI Behaviour System
Due to the complexity of the intended enemy behaviour, I chose to implement a Behaviour Tree system rather than a traditional state machine. Behaviour Trees allowed for modular, expandable, and more readable logic—crucial for layered decision-making and nuanced reactions.
Unity does not provide native Behaviour Tree tooling, so I chose to build the entire system from scratch rather than using a paid asset. The system included standard composite, decorator, and leaf nodes, supported by a shared blackboard for data exchange between nodes. To support usability, I also developed a custom Behaviour Tree Editor using EditorWindow and Unity's GraphView API, enabling node-based visual editing and easier debugging.
To avoid the system becoming a “black box”, I extended the editor with live runtime debugging: active execution paths, node evaluation states, and blackboard contents were visualized in real time. This dramatically improved iteration speed and made it easier to diagnose AI decision-making.
Specimen Behaviour
The enemy AI was inspired by Alien: Isolation's dual-layer design, consisting of a macro system for directing global movement and a micro system for moment-to-moment behaviour. Given the project scope, a simplified macro system was implemented, guiding the specimen between points of interest until a target was detected.
The micro behaviour system focused on sensory-driven decision-making and featured five core behaviours: stalking, charging/attacking, evading, fleeing, and backtracking. Visual detection was heavily emphasized, with extensive line-of-sight logic and path evaluation to avoid exposing the specimen to gunfire. Navigation costs on the navmesh encouraged stealthy movement through cover—successfully reducing the enemy's thermal visibility to the player.
Stalking: Circles and approaches targets from cover, waiting for the right moment to engage.
Charging/Attacking: Commits to a high-speed ambush only when a safe approach path exists; ends in a lethal leap if successful.
Evading: Avoids soldier line of fire while maintaining pressure.
Fleeing: Retreats and relocates after an attack to reset tension.
Backtracking: Returns to last known target location if vision is lost, instead of restarting full patrol.
While some planned features—such as audio sensing—were cut due to time constraints, the final behaviour successfully delivered the intended tension. Player feedback described the enemy as intelligent, threatening, and unpredictable.
Results & Takeaways
The AI system achieved its goal of creating a challenging, reactive, and suspenseful opponent that enriched the tactical gameplay experience. The custom Behaviour Tree system and editor proved highly effective and reusable for future projects.
Robust AI Foundation: Building the behaviour system from scratch provided deep insight into AI architecture and Behaviour Tree design.
Tooling & Debugging: Developing a visual editor with live runtime introspection dramatically improved iteration and understanding of AI decision-making.
Design Lessons: More iterative testing and earlier behaviour prototyping would have prevented late-stage refactors.
This project strengthened my skills in gameplay AI, behaviour tree architecture, AI debugging tooling, and Unity editor extensions. It also taught the value of time-scoping features, balancing custom tech vs. off-the-shelf solutions, and validating behaviours early in production.
See More
The code of the behaviour tree system, including the editor, can be found in this Github Repository.
The playable game can be found on this Itch.io page.
