Studycase: Hack and Slash prototype with Unreal Engine
if any image is not shown, please open it in a new tab
PROJECT LINK
DEMO VIDEO
TECH STACK
| Platforms | Windows |
| Game Frontend | Unreal Engine 4.4 |
| Showcasing | Combo Chain Subsystem, AI Behaviour Tree, Animation Mixing, Blueprints, C++, Data Assets |
โ๏ธ TECHNICAL INFORMATION
- Engine: Unreal Engine 5.4.4
- Source: Blueprint & C++
- Demo video: Here or in the download panel below.
๐ฎ HOW TO PLAY
| Action | Input |
|---|---|
| Move | WASD |
| Jump | Space |
| Light Attack | Left Click |
| Heavy Attack | Right Click |
| Dodge Left | Q |
| Dodge Right | E |
๐ก Try mixing light and heavy attacks with directional dodges to explore different combos and behavior reactions.
โ๏ธ FEATURE DECISIONS
๐ COMBO SYSTEM
While not the core focus of the current test, the combo system is critical to gameplay. It defines how both * players and AIs perform actions*, and it decides the flexibility allows for dynamic, scalable design.
โ Design Goals
- Scalable and designer-friendly
- Clear separation between combo animation and logic tree
- Lower dependencies between design combo flows and present combo action
After extensive iteration, the final structure includes the following components:
๐งฉ Components
ComboInput
- Represents basic input actions (Light Attack, Heavy Attack, Counter, Dodge, etc.)
- Used to traverse the combo tree
ComboTree
- A Trie-like data structure for navigating input sequences
- Starts from a root (default state) and moves through valid input chains
ComboSubsystem
- Central system for managing combo trees
- Builds and manages combo trees for all relevant actors
ComboRunner
- Manages player interaction with combo trees
- Fetches tree from
ComboSubsystem, progresses based on input - Validates input at each stage to determine the next combo node
ComboAnimationPlayer
- Executes animations based on current combo state
- Communicates with the
ComboRunnerto play appropriate animations - Uses Animation Montages with Combo Window Notify States to control combo timing windows
- (WIP) use “Combo Fastfoward State” to increase combo speed and smooth
๐ Diagrams
๐๏ธ Data Asset views
๐ค AI BEHAVIOR
Thanks to Unreal Engineโs native support for:
- Behavior Trees
- Blackboards
- BT Tasks and BT Conditions
AI logic is cleanly implemented and developer-efficient.
AI Perception
AI can detect the player through:
- Sight
- Sound
- Custom scripted triggers
๐งญ AI Modes
โ๏ธ AI can execute combos, such as Player do because they send the same input flow as player’s.
โ๏ธ To briefly demonstrate fighting impacts, hit actions now PUSH targets away instead of causing damages.
๐ก Wander Mode
- AI walks between 4 predefined waypoints
- Pauses at each waypoint for ~8 seconds
- Randomly plays idle/fun animations
- When disengaging from combat, AI returns to the nearest waypoint
๐ด Engage Mode
- AI approaches the player when in range
- Stops at appropriate combat distance
- Behavior includes:
- Evading player attacks
- Counter-attacking upon successful evade
- Flanking if behind the player
๐ฒ Behaviour Tree
๐บ PLAYER ANIMATION
- Base animations reused from Unreal Engine Mannequin
- Customizations added for immersion and responsiveness
Enhancements:
- Randomized idle animations to add realism
- Player automatically draws sword when:
- Enemy is near
- Enemy is visible via the camera system
- AI automatically draws sword when see or hear Player (via AI Senses).