← Back to Portfolio
Demo UE5 C++ GAS Solo Dev

Greatsword Combat System

A third-person melee combat system centered around a greatsword. Design references: Dark Souls stamina management + Monster Hunter charge attack commitment + Elden Ring guard counter. Core experience: every swing carries weight and decision cost — each attack is a risk investment.

UE5 C++ Engine
7 Days Timeline
Solo Design + Code + AI + HUD

Design Goal

Build a greatsword-centric third-person combat system where every attack feels heavy and deliberate. The combat loop is designed around stamina as a shared resource — players must constantly weigh "one more swing" against "saving enough to dodge."

Design Pillars: Weight & Impact / Risk-Reward Stamina Economy / Defensive-to-Offensive Transitions / Animation Cancel Skill Expression / Readable Enemy Reactions

Attack System — 6 Types

Six attack types cover different combat scenarios, differentiated by stamina cost and enemy reaction type:

Light Attack

Combo chain with lowest stamina cost (10). Fast startup, triggers Stagger. The safe, sustained damage option for maintaining offensive pressure.

Heavy Attack

High damage punish (stamina cost 25). Triggers Stagger. Designed as the primary reward for reading enemy openings — higher investment, higher payoff than light attacks.

Jump Attack

Aerial attack with light/heavy variants. Adds vertical combat options and serves as a follow-up from jump dodges, enriching spatial combat layers.

Shield Attack

Attack from guard stance (stamina cost 30). Triggers Knockback. Inspired by Elden Ring's guard counter — a direct defense-to-offense transition without needing to drop guard first.

Charge Attack

Highest risk, highest reward (stamina cost 35). Locked in place during charge — no movement or dodge. Triggers Knockback on hit. Inspired by Monster Hunter greatsword's true charged slash philosophy.

Roll Attack

Special attack triggered after a roll. Same damage as light attack, triggers Stagger. Provides a seamless dodge-to-offense transition, keeping combat flow uninterrupted.

Roll & Animation Cancel

Roll input overrides all attack recovery frames, enabling animation canceling. Skilled players can chain Attack → Roll Cancel → Roll Attack → Attack for burst damage far exceeding normal combos.

The deliberate trade-off: rolls cost 20 stamina on top of attack costs, so this cancel loop drains stamina extremely fast. Players must balance burst damage output against keeping enough stamina to escape when the enemy retaliates. Greedy play is powerful but punished hard.

Weapon Stance (1H / 2H)

Players can switch between one-handed (1H) and two-handed (2H) weapon stances. Each stance has its own independent animation set, providing visual variety across the same attack types.

Hit Feedback — HitStop System

Hit feedback is the core "feel" layer of the combat system.

  • HitStop: On hit, enemy time dilation drops to 0.01 (near-frozen), player drops to 0.05 (micro-stutter), lasting 0.06 seconds
  • Creates a momentary "blade cutting in" sensation — every swing lands with tangible weight

Stamina System

Dark Souls-style stamina gating: at 0 stamina all attacks and rolls are locked, but any stamina above 0 allows action (even if it bottoms out after). This creates the classic Souls trade-off — always deciding between "one more hit" and "save enough to survive."

10 Light Attack
20 Roll
25 Heavy Attack
30 Shield Attack
35 Charge Attack
15/s Sprint

Recovery: 2-second delay after last stamina-consuming action, then regenerates at 30/sec. Timer resets on any attack, roll, or sprint — no passive regen during offense.

Enemy AI & Reaction System

Behavior Tree AI

Enemy AI driven by UE5 Behavior Tree. BTService runs sphere detection every 0.25s, locking onto the player and updating distance. Attack decisions: 30% chance of heavy attack animation, otherwise normal attack. Faces target before playing Montage. Interrupted on stagger or death.

GameplayTag-Driven Reactions

Enemy hit reactions are driven by GAS GameplayEffect Asset Tags. When a weapon connects, the corresponding GE is applied, and its Tag determines the reaction type:

Advantage: reaction types are configured in GE blueprint Tags — adding new attacks or adjusting reactions only requires data asset changes, no C++ modifications.

Technical Architecture