An AI NPC simulation developed in Unreal Engine that facilitates emergent gameplay. The system uses a needs-based, reactive approach, built with C++ and Unreal's State Trees to create a dynamic world with unscripted gameplay opportunities.
Important
This repository contains only the source code for the project. The Content
folder, has been intentionally excluded to respect third-party asset licenses. As a
result, this project cannot be built or run from this repository alone. Its purpose is to showcase the underlying C++ code
and AI architecture. If you are interested in seeing the full project feel free to contact me.
All source code for this project is located in the Source/
directory, which contains two modules:
NPCEnvironment_Demo/
: Contains the main project source.NPC/
: The AI NPCInventory/
: The inventory system including state tree tasks and conditions
CustomStateTree/
: Generic State Tree tasks and conditions
The core of the NPC logic is defined in a State Trees. Below are screenshots of its structure, which outline the NPC's decision-making process.
Additionally, Smart Objects have their own State Trees such as the stick shelter and item State Trees shown below.