top of page

Undead Onslaught AI

In this breakdown, I will be showing how I designed as a modular, scalable wave-based AI framework for Unreal Engine, built entirely using Blueprints. The goal was to create a responsive and engaging Horde Mode where enemies spawn in waves, track the player using Behavior Trees, and escalate in difficulty over time.

Role

Lead Developer

team size 

1 person

development time

on-going

Game Engine

Unity

Genre

First Person Shooter

Technologies used

image.png

Unreal Engine 5

image.png

C#

image.png

GIT

image.png

Photoshop

image.png

Trello

Design Goals

  • Design AI that is relentless but readable

  • Build a scalable framework for spawning, tracking, and combat logic

  • Ensure performance across dozens of enemies simultaneously

AI System in Action

​This demonstration showcases the AI system’s core features in a live gameplay environment, highlighting how AI characters seamlessly transition between states, adapt their combat behavior in real-time, and react dynamically to player actions. From idling and pursuing the player to engaging in complex boss encounters with health-based phase transitions, These clip illustrates the depth and flexibility of the AI system I designed and implemented.

AI Character Blueprint

This dynamic proximity check system for AI behavior using a Behavior Tree and Blackboard. On game start, the AI controller runs a custom behavior tree (BT_Zombie) to manage decision-making. During gameplay, an Event Tick node continuously monitors the distance between the AI-controlled zombie and the player character. If the player is within a 120-unit range, a boolean key (In_Attack_Range) is set to true in the blackboard; otherwise, it remains false. This setup allows the AI to react in real time based on the player's proximity enabling transitions such as entering an attack state when close enough. This system forms the backbone of reactive enemy behavior, integrating core AI logic with blackboard-driven decision-making.

Dynamic Wave Spawning

This Blueprint showcases a modular stun and poise system designed for enemy characters in Unreal Engine. When the enemy receives a valid hit, the system accumulates poise damage over time, evaluating whether it exceeds a threshold that would trigger a stun. Once stunned, the enemy enters a vulnerable state, halting its behavior and enabling the player to perform a critical hit or riposte. The Blueprint manages poise decay, ensuring the value resets gradually if the enemy is not being hit. This layered approach allows for dynamic and rewarding combat mechanics that reinforce skill-based gameplay, while remaining performance-efficient and scalable across multiple enemy types.

Combat Systems

This handles the logic for an AI enemy melee attack. It begins by validating the AI reference using Get BP Enemy AI and an IsValid node to ensure the script proceeds only if the AI is active. It then checks if the player is within attack range using a line or sphere trace based on the AI's mesh socket location. If the trace confirms a valid target, the system selects a random integer between 0 and 2 to determine which of several predefined attack animations to execute. A Switch on Int node branches the logic accordingly, leading to one of two nearly identical attack sequences. Each path retrieves the AI mesh and socket location, plays the chosen attack montage using Play Montage, and includes a delay to sync the behavior with the animation. The script also sets a boolean to indicate the AI is currently attacking and ends the behavior with a Finish Execute node, likely used in a Behavior Tree. This setup adds variation to the AI's combat behavior while maintaining clear structure and animation timing.

Technical Breakdown

AI moving to Player

This Blueprint represents a custom AI Task within Unreal Engine’s Behavior Tree system, designed to drive intelligent navigation behavior for enemy characters. When the task is executed, it first retrieves the controlled pawn (AI character) and casts it to a specific custom player character class (BP_FirstPersonCharacter_C). It then acquires the player character as the target actor using the Get Player Character node, enabling dynamic, real-time tracking during gameplay.

Using the AI Move To node, the enemy AI attempts to navigate toward the player’s location with an acceptance radius of 20 units allowing for precise proximity targeting while avoiding unnatural or jittery movement. The movement result is monitored to determine whether the task completes successfully (reaching the target) or fails (obstructed or pathfinding error). Based on this result, the task calls Finish Execute, providing clean feedback to the behavior tree to influence further decision-making such as attacking or repositioning.

This system allows for modular, scalable AI behavior that can be reused across various enemy types and scenarios. It demonstrates my understanding of AI task flow, casting, and Unreal Engine's navigation systems, while contributing to immersive and responsive enemy pursuit mechanics in gameplay.

AI Spawner

This Blueprint demonstrates a dynamic enemy spawning system. The system allows for the real-time instantiation of custom enemy actors (BP_EnemyMain_C) with fully parameterized attributes, enabling scalable and flexible enemy behavior tuning at runtime.

​When the Spawn function is triggered, the system initializes an enemy at a specified transform using the SpawnActor node, with collision handling configured to always allow spawning. Immediately after instantiation, the enemy’s key attributes Max Health, Attack Speed, and Max Walk Speed are set based on externally defined values. These are applied directly to the enemy’s custom health component (BPC_Health) and the character’s movement component, allowing for variation between enemy types or difficulty levels.

By decoupling the data setup from the enemy blueprint itself, this system supports procedural enemy generation and enables rapid iteration during development. It’s especially valuable in wave-based or randomized gameplay scenarios where enemies must be generated with specific traits on the fly. This approach also demonstrates my ability to work with modular Blueprint architecture, component-based design, and runtime configuration of character behavior in Unreal Engine.

Architecture Overview

  • Facebook
  • Twitter
  • LinkedIn

©2021 by Joseph Merrick. Proudly created with Wix.com

bottom of page