Dragon Boss

Home Github

Overview

Name: DragonBoss AI
Engine: Unreal Engine 5
Language: C++
Type: Advanced AI Boss with dynamic, modular design
States: Idle/Patrolling, Attacking, Investigating
Unique Mechanics:

  • Dynamic flying transitions
  • Combo-based attack selection
  • Target re-acquisition during investigation
  • Behavior Tree integrated logic

Project Goal

The primary objective of this project is to recreate an authentic boss fight experience featuring a dragon as the main boss, leveraging the full power of Unreal Engine 5 and C++ programming.

The DragonBoss is designed as an intelligent and formidable entity, built to deliver a dynamic, visually spectacular, and technically advanced challenge. Its AI simulates realistic, unpredictable, and adaptive behavior, forcing the player to constantly adjust their combat strategies.

  • Epic Combat Experience: Multi-phase boss with aerial maneuvers and advanced AI decision-making.
  • Realistic & Reactive: Adapts to player actions with investigation phases, varied combo attacks, and airborne chases.
  • Full FX Integration: Every state paired with custom animation and audio-visual feedback.
  • Modular/Scalable: AI logic via custom C++ Behavior Tree nodes for easy future expansion.
  • Technical Mastery: Demonstrates advanced proficiency in Unreal Engine, Behavior Trees, and data-driven design (UAttackDataAsset).

AI States & Mechanics

  • Idle/Patrolling:
    • Ground patrol using NavMesh and spline path
    • Triggers flying transition (takeoff) at path end
    • Aerial patrol in circular loops, managed via EFlyingActionState enum
    • Visual FX: Walking/flying animations, wing-flap effects
  • Attacking:
    • Target detection via AI Perception (sight)
    • Walks/flies to optimal attack range
    • Dynamic Combo System: Uses UAttackDataAsset, filters by range/priority/cooldown, auto-selects best attack via UBTTask_DragonSelectionComboAttack
  • Investigating:
    • Triggered on target loss
    • Random movement in investigation sphere (FAISphereInvestigationRadius)
    • 10–100s search, then re-engages or resumes patrol
    • Alert animations, vocal cues, flying swirl
Dragon AI States

C++ AI Behavior Tree Nodes

Task Nodes

  • UBTTask_DragonSelectionComboAttack: Chooses best attack, stores in blackboard, fallback to default if none
  • UBTTask_DragonFlyToLocation: Flies to patrol points with flight physics
  • UBTTask_DragonInvestigateArea: Random sphere investigation, ends on timer

Service Nodes

  • UBTService_UpdateFlyingState: Triggers takeoff, updates IsFlying on blackboard
  • UBTService_CheckTargetLost: Monitors target, starts investigation on loss
  • UBTService_UpdateCooldowns: Updates attack cooldowns in real time

Decorator Nodes

  • UBTDecorator_CanAttack: Validates attack selection & range
  • UBTDecorator_IsTargetVisible: Checks target sight
  • UBTDecorator_HasReachedSplineEnd: Triggers flying transition
DragonBoss Behavior Tree

Supporting Classes

  • UAttackDataAsset: Modular data config for attacks; fully data-driven for tuning damage, cooldown, animation
  • ABossController: Manages perception, state transitions, attack selection logic
  • ABossDragonCharacter: Handles all movement, attacks, animation, FX, combo/cooldown management

Technical & Design Highlights

  • Modular, Scalable AI: All logic in custom C++ nodes, enabling rapid iteration and expansion
  • Data-driven Systems: Attacks and states tuned via assets, not hardcoded
  • Full Integration: AI, Animation, VFX, SFX all managed and triggered programmatically
  • Advanced Use of Unreal BT & Perception: Complex AI decisions and transitions, built from scratch

Let's get in touch!

Interested in AI, boss design, or Unreal tech? Reach out—let’s talk dragons, C++, or game development!