

Ashen Vanguard
3D Third-Person Action-RPG | Unreal Engine 5 | C++ & Blueprint
A souls-like combat game built focusing on AI programming and component-based architecture. Features a challenging boss fight with dynamic behavior and precise melee combat.
Tech Stack: Unreal Engine 5 | C++17 | Behavior Trees | Animation Blueprints | Enhanced Input
Development Approach
I chose C++ over Blueprint-only development to improve my software engineering skills and access lower-level engine features. The component-based architecture keeps each system focused on one responsibility - StatsComponent handles health/stamina, CombatComponent manages attacks, TraceComponent does hit detection, etc. This made debugging much easier since I could isolate problems to specific components.
I used interfaces (IFighter, IMainPlayer, IEnemy) to share behavior between different character types. For example, both player and boss implement IFighter for damage calculations, but only the player needs IMainPlayer for stamina checks. Components communicate through delegates to stay loosely coupled - when health changes, StatsComponent broadcasts an event that UI widgets listen to without knowing about each other.

Key Technical Systems
-
Socket-Based Weapon Collision
-
My initial sphere collision approach felt inaccurate - hits registered when the sword was behind enemies. I switched to box sweeps between weapon sockets (blade tip and hilt) that run only during active attack frames. The box dimensions match the weapon length and rotate with the swing path, giving frame-accurate hit detection. An AnimNotifyState controls exactly when collision is active to prevent false hits during windup.
-
-
AI Boss Behavior Tree
-
The boss uses a state machine (Idle → Range → Melee → Charge) driven by player distance. A custom service (BTS_PlayerDistance) updates distance every tick. The boss throws projectiles at range, switches to combos when close, and occasionally does a charge attack. I implemented a probability threshold that increases each time the boss doesn't charge, making the timing unpredictable but not random.
-
During charges, I boost movement speed from 600 to 2000 and use pathfinding to navigate toward the player. The BTT_ChargeAttack task handles state transitions, speed changes, and animation triggers. If the player moves out of melee range during an attack, the task aborts and switches states mid-action.
-

-
Stamina Management
-
Every action costs stamina (attacks: 5, blocks: 10, rolls: 5, sprint: 0.1/frame). Regeneration has a 2-second delay using RetriggerableDelay, so continuous actions reset the timer. Components check stamina through the IMainPlayer interface before executing - if you're out of stamina while sprinting, you automatically slow to walk speed without player input.
-
-
Lock-On System
-
Performs a sphere trace on a custom collision channel to find nearby enemies. Once locked, the camera follows the target and breaks automatically if distance exceeds 1000 units or the target dies. Movement switches from "orient to movement" to "use controller rotation" for strafing. A delegate notifies PlayerAnimInstance to blend between exploration (4-directional) and combat (8-directional) animations.
-
Technical Challenges
-
Animation Timing: Hit detection syncing with sword swings was harder than expected. Placing AnimNotifyState markers in the timeline gave me frame-perfect control over when collision is active.
-
Memory Management: Forgot to clear the TargetsToIgnore array after attacks initially, causing combo hits to only register once per enemy. Added HandleResetAttack() called via AnimNotify to reset state between attacks.
-
Stat System Refactor: Changed from FName string lookups to TMap<EStat, float> enum keys for faster access and compile-time error checking instead of runtime bugs.
What I Learned
Component architecture made debugging significantly easier - when hit detection broke, I only checked TraceComponent instead of the entire character class. Behavior Trees were confusing initially, but understanding the Blackboard as shared memory between tasks was the key insight. I learned to use interfaces for polymorphic behavior and delegates for event broadcasting, which kept systems loosely coupled. Balancing C++ for core systems with Blueprint for rapid iteration gave me both performance and flexibility.
