Turn-Based Combat System

Time on project: .5 years (Fall 2024 – Spring 2025)
Engine: Unity3D
Language: C#
Featured in:Laguna“, “The Long Night“, “Njord’s Embrace

Main Contributions:

  • Implemented how the system executed abilities.
  • Defined how abilities are constructed to allow for flexible re-usability of ability components.
  • Expanded the debugging info to allow for easier debugging within Unity3D.
  • Wrote extensive unit tests using NUnit and NCrunch.

Functionality:

The turn-based combat system was a unified way of handling the combat in our three demos. The core was written as a standalone library to allow for multiplayer by run using a non-unity service on a server. The system is applying the MVC and Command pattern. On top of the core we developed a set of Unity objects to allow for easy setup of complex ability and AI behaviors.

The system allows for modular construction of abilities. Each ability defines a set of target groups where each target group represents a collection of targets acquired in a specific way, (eg. Direct, Line, Arc, AoE, etc). The ability then has a list of effect steps where each step will target a specific target group. The individual target group types and ability effects are defined in independent classes allowing for re-use across several abilities. Furthermore we also added conditional gates in order to conditionally filter targets before applying certain effects.