← Back to selected work

AI & GAMEPLAY PROGRAMMING

DragonBoss

A modular Unreal Engine 5 C++ boss AI built around ground/air transitions, perception, investigation and data-driven combo selection.

Unreal Engine 5C++Behavior TreesAI PerceptionData AssetsBoss AI
MULTI-PHASE BOSS AI
RoleAI & Gameplay Programmer
EngineUnreal Engine 5
LanguageC++
TypeAction-RPG Boss Fight

The goal was to build a boss that changes behavior rather than simply cycling attacks.

PATROL

Ground & aerial patrol

The dragon patrols on the ground, transitions into flight at path boundaries and continues along aerial movement logic.

COMBAT

Dynamic attack selection

Attacks are selected from data assets using range, priority and cooldown conditions instead of hard-coded branches.

PERCEPTION

Target awareness

AI Perception drives target detection and re-engagement while keeping state changes centralized.

INVESTIGATION

Target-loss behavior

When sight is lost, the boss searches a configurable area before either re-acquiring the player or returning to patrol.

Dragon Boss AI states and encounter logic
Dragon Boss AI states and encounter logic

I extended Unreal’s Behavior Tree with custom C++ tasks, services and decorators so the boss logic could stay modular and readable.

TASKS

Selection, flight, investigation

Custom tasks choose attacks, move through aerial patrol points and execute investigation behavior.

SERVICES

Continuous state updates

Services update flying state, monitor target loss and maintain attack cooldown information.

DECORATORS

Context validation

Decorators validate attack conditions, visibility and patrol milestones before branches are entered.

DATA

UAttackDataAsset

Attack tuning lives in data instead of code, making damage, cooldowns and animation references easier to iterate.

Behavior Tree and supporting C++ AI systems
Behavior Tree and supporting C++ AI systems
  • ABossController: Owns perception, high-level state changes and attack selection.
  • ABossDragonCharacter: Handles movement, attack execution, animation, VFX and cooldown interaction.
  • Modular AI: New attacks or behaviors can be introduced without rewriting the full boss state flow.
  • Full integration: Animation, audio-visual feedback and gameplay state are triggered from the same underlying AI decisions.