
Joshua Lee
Game Designer
NPC Behavior Scheduling System
A system for populating open worlds with reactive NPC behaviors using a limited actor pool.
Prototype captured in Unreal Engine 5
Overview
Designed and prototyped a system to streamline the scheduling of NPC daily behaviors.
The goal of this tool is to increase world immersion by enabling NPCs to perform believable, context-aware actions based on time of day and other stimuli—creating a world that feels active and alive without direct player involvement.
Key Features
-
SPAWN TREES:
Custom-made Behavior Tree framework used to conditionally spawn NPCs and assign behaviors based on world state. Click here for more info on Spawn Trees.
-
STATE TREES:
Drive high-level NPC decision-making, allowing characters to locate and claim available Smart Objects.
-
SMART OBJECTS:
Interactable objects placed throughout the world. Once claimed, they take control of the user's behavior to execute specific behaviors (e.g., working, resting, idling anims).
-
MOTION MATCHING:
Provides natural-looking locomotion by selecting closest-match animation frames based on movement trajectory.
-
MOTION WARPING:
Provides smooth transitions between movement and interaction animations.
What I Learned
-
Gained hands-on experience with several of UE5’s newer tools, including State Trees, Smart Objects, and Motion Matching
-
Practiced using multiple AI methodologies in tandem (State Trees + Behavior Trees) to create a single cohesive behavior setup.
What's Next
-
Introduce a second group of hostile NPCs with their own daily schedule.
-
Enable emergent interactions: when opposing groups run into each other, they dynamically break from their schedule to engage in combat. On combat completion, they resume their schedules.
-
Expand the system to support more dynamic behaviors. (e.g. react to weather, deliver contextual dialogue, etc.)