Context
Swordfight is a top-down fighting game with 14 playable characters, boss battles, per-character soundtracks, and leaderboards, built by a 10-person cross-functional student team in Unity and shipped to itch.io, where the game page has drawn 150k views and holds 4.5★ across 111 ratings.
I owned two systems: the weapon architecture and the enemy AI. I also owned the version control strategy that kept ten people from destroying each other's work.
Architecture
The weapon system is interface-driven and polymorphic: abstract base classes define the combat contract (attack lifecycle, hitboxes, damage application), and each weapon implements only what makes it unique. Adding a new weapon meant writing one subclass instead of copy-pasting combat logic, so the roster could grow quickly late in development without breaking the weapons already in it.
Enemy AI runs on a Hierarchical Finite State Machine: top-level states (patrol, engage, recover) own nested sub-states, which keeps multi-stage boss fights tractable. A boss phase change is a top-level transition, and each phase's attack patterns live in their own sub-machine instead of one giant switch statement.
The hard problem: ten people, one Unity project
Unity scene files are effectively unmergeable. When two people edit the same scene, the conflict can't be resolved line by line. With a 10-person team of artists, designers, and programmers all committing, this was the biggest threat to shipping.
I managed branch strategy and version control via PlasticSCM: feature branches with defined merge protocols, scene ownership rules so no two people had the same scene open for edit, and coordinated integration windows for release builds. The process work was as load-bearing as any code, and the final release builds went out on schedule.
Decisions & trade-offs
- HFSM over behavior trees. For deterministic, designer-tunable boss patterns, nested state machines were simpler to reason about and debug than a behavior-tree framework would have been.
- Process as a deliverable. On a student team, version control discipline and regular meetings decided whether we shipped at all, so it got the same attention as the code.
Results
Shipped on itch.io with 14 characters in the final roster. The page has drawn 150k views and holds 4.5★ across 111 ratings, and people still leave comments calling it a hidden gem.