
Capture the Flag (Goal-Oriented Action Planning)
About
Capture the Flag is a Unity tech demo exploring real-time Goal-Oriented Action Planning (GOAP). Inspired by the classic Capture the Flag multiplayer mode, the project was created as a personal experiment in AI programming using Unity’s standard assets.
Project Info
Role(s): Game Developer
Team Size: 1
Timeline: Oct 2019 - Dec 2019
Engine: Unity (C#)
Tags: 3D, Action, AI, Arcade, Combat, Score, Strategy
Updated: Mar, 2026
Capture the Flag was developed as part of the Artificial Intelligence for Games (DAC619) module during my undergraduate degree in Computer Games (Indie) at Southampton Solent University. Throughout the module, we explored different frameworks used to model complex decision-making AI, including state machines, behaviour trees, A* pathfinding, and GOAP.
For the assignment, we selected one of these frameworks and implemented it into a Capture the Flag game mode. In the simulation, teams of red and blue capsules compete against each other, collecting power-ups to improve their stats, such as damage and movement speed, while attempting to capture the enemy flag or defend their own.
I found this module particularly fascinating, as it gave me a deeper insight into the systems that drive AI behaviour in games. It helped me better understand the different frameworks developers use to model decision-making and why certain approaches are chosen depending on the design of the game.


On this project, I took on the role of AI Programmer, implementing a GOAP (Goal-Oriented Action Planning) system in C#. I developed behaviours that allowed AI agents to engage in combat, collect power-ups and pickups, defend their flag, and attempt to capture the enemy’s flag.
The AI was also capable of supporting teammates by healing allies, responding to combat situations, and navigating the environment effectively. To ensure the system worked reliably, I carried out extensive testing to confirm that the game mode could be successfully completed through AI decision-making alone.
I remember being particularly intrigued by learning about the different architectures used in AI systems and how the best approach often depends on the type of game being developed. GOAP stood out to me because, while the concept is relatively straightforward, implementing it effectively can be much more challenging.
At its core, GOAP breaks down complex goals into a series of smaller actions that an AI agent can perform, which are then organised into a plan that guides the agent toward achieving its objective.
I’m proud that I challenged myself with this system, and the final result proved to be successful. However, while the project gave me valuable experience with several AI models, I wouldn’t claim to have mastered them. Systems like GOAP require careful design, iteration, and time to fully understand and refine.