< Return to Engineering Blog
Engine ArchitectureNOV 1, 2026 // 4 MIN READ

Building Souls-Like Poise & Hyper Armor in UE5 C++

Learn how to build a high-performance, deterministic Souls-like poise and hyper armor system in Unreal Engine 5 using clean C++ and modular components.

The Architectural Philosophy: Ditching Heavyweight Frameworks

At Outlore Interactives, our philosophy for hardcore action combat—whether architecting systems for Project Ronin or building bespoke C++ engines—centers on extreme mechanical responsiveness and mechanical clarity. Many modern UE5 tutorials default to massive, heavyweight architectures like 300,000-line Gameplay Ability System (GAS) stacks or messy Blueprint graphs for simple combat arbitration. For an uncompromising, high-precision combat feel, we favor lean, explicit C++ components and strict state machines: zero unnecessary tick overhead, deterministic hit-arbitration protocols, and animation-driven notify states that give frame-accurate hyper armor windows without architectural bloat. Read technical details on outlore game studio project ronin.

When building a Souls-like poise and hyper armor system, you must decouple data from execution. Stacking variables directly onto your character class guarantees spaghetti code and maintenance nightmares. Instead, encapsulate all poise tracking, threshold checks, and armor multipliers inside a dedicated UActorComponent instantiated natively in your character's C++ constructor. Read technical details on project ronin action combat souls-like. Reference: UE5 Swept Melee Collision: SweepMultiByChannel C++.

Decoupling Poise Logic into a Dedicated UActorComponent

Isolating combat metrics into a modular component ensures that your AI controllers and player characters share an identical arbitration interface. We utilize cache-friendly hit context structures passed by const reference to avoid dynamic memory allocation during high-frequency combat hitsparks and trace events. Read technical details on parry mechanics hit-stop input buffering combat design.

cpp
#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "PoiseComponent.generated.h"

USTRUCT(BlueprintType)
struct FPoiseHitContext
{
    GENERATED_BODY()

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    float PoiseDamage = 0.0f;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    AActor* DamageCauser = nullptr;
};

UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class OUTLORE_API UPoiseComponent : public UActorComponent
{
    GENERATED_BODY()

public:
    UPoiseComponent();

    UFUNCTION(BlueprintCallable, Category = "Combat|Poise")
    void ReceivePoiseDamage(const FPoiseHitContext& HitContext);

    UFUNCTION(BlueprintCallable, Category = "Combat|Poise")
    void SetHyperArmorActive(bool bActive, float DamageMultiplier = 1.0f);

protected:
    virtual void BeginPlay() override;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Poise")
    float MaxPoise = 100.0f;

    UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Poise")
    float CurrentPoise = 100.0f;

    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Poise")
    float PoiseRegenDelay = 3.0f;

    bool bIsHyperArmorActive = false;
    float HyperArmorAttenuation = 1.0f;

    FTimerHandle RegenTimerHandle;
    void ResetPoise();
};

Implementing Frame-Accurate Hyper Armor via UAnimNotifyState

Hyper armor should never be a blanket character state managed by arbitrary boolean flags toggled in animations. We use native C++ UAnimNotifyState subclasses. These classes cleanly inject armor state modifications directly into the animation montage timeline, guaranteeing frame-accurate activation and termination windows. Read technical details on Structuring Character State Machines in C++ for Action Combat.

cpp
#pragma once

#include "CoreMinimal.h"
#include "Animation/AnimNotifies/AnimNotifyState.h"
#include "PoiseComponent.h"
#include "AnimNotifyState_HyperArmor.generated.h"

UCLASS()
class OUTLORE_API UAnimNotifyState_HyperArmor : public UAnimNotifyState
{
    GENERATED_BODY()

public:
    virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override;
    virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override;

protected:
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hyper Armor")
    float ArmorDamageAttenuation = 0.5f;
};
cpp
#include "AnimNotifyState_HyperArmor.h"

void UAnimNotifyState_HyperArmor::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference)
{
    Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);

    if (!MeshComp || !MeshComp->GetOwner()) return;

    if (UPoiseComponent* PoiseComp = MeshComp->GetOwner()->FindComponentByClass<UPoiseComponent>())
    {
        PoiseComp->SetHyperArmorActive(true, ArmorDamageAttenuation);
    }
}

void UAnimNotifyState_HyperArmor::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
    Super::NotifyEnd(MeshComp, Animation, EventReference);

    if (!MeshComp || !MeshComp->GetOwner()) return;

    if (UPoiseComponent* PoiseComp = MeshComp->GetOwner()->FindComponentByClass<UPoiseComponent>())
    {
        PoiseComp->SetHyperArmorActive(false, 1.0f);
    }
}

Replacing Ticks with Event-Driven Poise Regeneration

A common performance pitfall in action game architectures is leaving `PrimaryComponentTick.bCanEverTick = true` on passive status components. Across 50 active AI combatants, continuous per-frame tick evaluation destroys your CPU cache budget. Instead, drive poise regeneration entirely through engine timer handles (`FTimerHandle`), resetting and clearing timers on demand when incoming hits occur.

cpp
void UPoiseComponent::ReceivePoiseDamage(const FPoiseHitContext& HitContext)
{
    // Clear active regeneration timer upon taking damage
    if (GetWorld()->GetTimerManager().IsTimerActive(RegenTimerHandle))
    {
        GetWorld()->GetTimerManager().ClearTimer(RegenTimerHandle);
    }

    float EffectiveDamage = HitContext.PoiseDamage;
    if (bIsHyperArmorActive)
    {
        EffectiveDamage *= HyperArmorAttenuation;
    }

    CurrentPoise = FMath::Clamp(CurrentPoise - EffectiveDamage, 0.0f, MaxPoise);

    if (CurrentPoise <= 0.0f)
    {
        // Trigger Stagger / Break State
        CurrentPoise = MaxPoise; // Or apply deep stagger logic
    }

    // Schedule poise recovery
    GetWorld()->GetTimerManager().SetTimer(RegenTimerHandle, this, &UPoiseComponent::ResetPoise, PoiseRegenDelay, false);
}

void UPoiseComponent::ResetPoise()
{
    CurrentPoise = MaxPoise;
}

Designing an Explicit Hit Resolution Pipeline

To keep combat predictable and fair, all damage and poise calculations must pass through a single, deterministic arbitration pipeline. By handling validation, state checking, and reaction dispatching in strict sequential order, you eliminate unpredictable race conditions between overlapping hitboxes and state changes.

When structuring your character classes, instantiate your combat components directly inside the constructor using `CreateDefaultSubobject`. This ensures proper memory layout and avoids initialization order bugs during level streaming.

KEY ARCHITECTURAL TAKEAWAYS

  • 01.Decouple poise and armor metrics into standalone UActorComponents instantiated via CreateDefaultSubobject to eliminate actor bloat.
  • 02.Drive hyper armor windows through native C++ UAnimNotifyState classes for frame-accurate timing directly tied to animation timelines.
  • 03.Eliminate per-frame tick overhead on passive gameplay components by utilizing FTimerHandle-driven event callbacks for status regeneration.
  • 04.Pass compact hit context structures by const reference to maintain high cache efficiency during multi-target trace events and hitsparks.

FREQUENTLY ASKED QUESTIONS

Why avoid the Gameplay Ability System (GAS) for a lightweight Souls-like combat system?

While GAS is exceptionally powerful for sprawling multiplayer action RPGs, its heavy abstraction layers, gameplay tag container lookups, and attribute-set overhead can introduce unnecessary complexity and latency for precise, tight single-player action combat.

How do you prevent hyper armor stacking exploits from multiple overlapping animations?

Maintain an internal integer counter or bitmask inside your UPoiseComponent rather than a simple boolean. When multiple notify states overlap, increment the counter on entry and decrement on exit. Hyper armor remains active as long as the counter is greater than zero.

Is it better to use enums or behavior trees for enemy combat states?

For focused boss encounters and disciplined action combat, clean enum-based state machines provide superior debug visibility and deterministic state transitions without the black-box confusion of complex behavior tree decorators.

// CONNECTED_ENGINEERING_DOSSIERS

All Articles >