GAME DEV ยท JAN 2026
USS Calliope
Isometric narrative survival horror with RPG elements, set aboard an overrun space station. Enemies change behaviour as an infection spreads through them.

At a glance
- ROLE
- Enemy AI programmer and main story writer
- TEAM
- Group project, Agile
- CONTEXT
- Course project at Forsbergs Skola, with GDD and technical design documents
What I built
- Enemy AI built on a finite state machine, with patrol and chase behaviour.
- Perception system with a vision cone and raycasts.
- Infection phase system: 3 phases with their own behaviour, detection and attack patterns.
- Enemy call system, so one enemy can alert others, and a ranged projectile system.
- Data-driven design with ScriptableObjects for attacks, infection phases and patrol zones.
- Main story and lore of the USS Calliope.
Technical decision
Infection phases as swappable components
Each enemy changes behaviour as its infection level rises. Instead of one big enum with if/else chains, the phase ranges live in ScriptableObjects and each phase is its own component implementing IPhaseBehavior. The state machine only listens for infection changes, picks the matching range and swaps the component, so a designer can retune thresholds or add a phase without touching this class.
EnemyPhaseStateMachine.cs
private void EvaluatePhase(float infectionValue)
{
foreach (var phase in phases)
{
if (infectionValue >= phase.minInfection &&
infectionValue <= phase.maxInfection)
{
SwitchPhase(phase);
return;
}
}
}
private void SwitchPhase(SO_InfectionPhaseData data)
{
vision?.SetPhaseData(data);
currentPhase?.OnExitPhase();
currentPhase = GetComponent(data.phaseName) as IPhaseBehavior;
if (currentPhase == null)
{
return;
}
CurrentRank = data.rank;
currentPhase.OnEnterPhase(data);
}