Horror Monster AI & Director

Unreal Engine AI System

A UE5 C++ horror AI system that combines custom sight and hearing, search behavior, dynamic chases, and an AI Director that controls encounter pacing.

Engine

Unreal Engine 5

Engine

Unreal Engine 5

Language

C++, Behavior Trees

Language

C++, Behavior Trees

Type

Enemy AI & AI Director

Type

Enemy AI & AI Director

Role

Lead Programmer

Role

Lead Programmer

Team

Build for Game 'Project Cas9

Team

Build for Game 'Project Cas9

Focus

Perception & Pacing

Focus

Perception & Pacing

Status

Functional Prototype

Status

Functional Prototype

Team Context

The AI system was developed for Project Cas9, a horror game project created by a team of seven where I worked as Lead Programmer. The main enemy needed to create interesting gameplay on its own without relying on many scripted events or additional gameplay systems.

I built the monster AI to handle perception, searching, chasing, and attacking, while a separate AI Director controls the overall pressure around the player. Inspired by Alien: Isolation, the two systems work together to create encounters without giving the monster constant knowledge of the player’s position.

The goal was to make the enemy unpredictable enough to carry the main gameplay, while still following clear rules that could be adjusted and debugged.

Responsibilities

Get Search and Investigation Behavior

Target is Responsibility

Built a Behavior Tree that lets the monster investigate targets, search designer-placed points, look around rooms, chase the player, and return to searching after losing them.

Custom Sight and Detection

Created a vision system with multiple view cones, partial visibility checks, detection buildup, and a combined detection level that uses both sight and hearing.

Custom Hearing System

Developed a shared hearing subsystem with sound emitters and Ear Components that takes sound range, movement speed, distance, walls, and paths around obstacles into account.

Get AI Director and Encounter Pacing

Target is Responsibility

Built an AI Director that tracks how tense of the current situation is and moves the monster closer or further away to control the amount of pressure on the player.

System Overview

The system separates the monster’s immediate decisions from the overall encounter pacing. The monster uses its own senses to detect sounds and visible targets. This information is passed into the Behavior Tree, where it can investigate, search, chase, or attack. The AI Director does not directly control every action. It watches the relationship between the monster and player and sends larger movement commands when the encounter has been too quiet or too intense.

High-Level Architecture

Perception & Detection

Search & Chase Behavior

AI Director & Encounter Pacing

Drag with LMB / RMB / MMB to pan · Ctrl-scroll to zoom · Pinch to zoom · Double-click reset

Highlights

Search & Investigation

Custom Hearing

Detection & Perception

AI Director

Context

The monster does not always know where the player is. After seeing or hearing something, it moves toward the last known location and searches nearby designer-placed points.

Search Points can tell the monster to visit a location or only look toward it. Their priority and some randomness are used to create different search paths each time.

Visualization

Search Path Visualization

UE Editor

The monster searches designer-placed points around its last known target instead of directly tracking the player at all times.

Challenges and Tradeoffs

Challenges & Tradeoffs

Combining Different Senses

Sight and hearing build detection in different ways. I needed to combine both values while still keeping track of which target the monster should react to.

Challenge

Unpredictability vs Designer Control

Random behavior made the monster less predictable, but too much randomness could feel unfair. Designer-placed Search and Spawn Zones kept it controlled.

Tradeoff

Impact

Created a monster that can search, investigate, chase and hear the player instead of always knowing their position.

Gave level designers control over search and spawn areas.

Improved encounter pacing by separating the monster’s behavior from the AI Director.

Added debug visualization for vision cones, visibility traces, sound bubbles, hearing ranges, search paths, Menace, and Safe Time.

Created reusable hearing components that can also be used by other AI characters.

What I Learned

Horror AI is not only about finding the player. The timing between encounters is just as important as the chase itself.

Splitting perception, monster behavior, and encounter pacing into separate systems makes each part easier to adjust.

Random behavior works better when it is limited by designer-controlled zones, points, and priorities.

Debug visualization is important for AI because most perception and decision-making cannot normally be seen.

What I Would Improve

Add a debugger that shows the current state, interest target, chase target, detection values, and Director command directly as text above the AI.

Improve search-path generation so it avoids repeating nearby points and considers where the player was last seen or heard.

Add material- and portal-based sound propagation for different walls, doors, and connected rooms.

Move more monster and Director settings into reusable tuning profiles for different levels or difficulty modes.

Improve the Director so it can react to player habits, hiding behavior, and repeated routes.

Connect monster vocal sounds and music more closely to its current behavior and Director Menace.

Copyright © Julian Serve 2026

Copyright © Julian Serve 2026

Copyright © Julian Serve 2026