
The Veiled Ones
Enemy AI Designer
Project Overview
The Veiled Ones is a 1st-person stealth-horror game where you play as Ali, a Muslim exorcist. Avoid invisible enemies and peer into their world with a mystical artifact: the Looking Glass!
INFO:
GENRE: 1st-person stealth-horror
TOOLS: Unity, C#, Behavior Trees
TIMELINE: May 2023 - May 2024
I was the Enemy AI Designer, where I:
Designed, iterated on, and polished 3 enemies and 5+ behaviors
3 Enemies: 1 boss, 1 standard enemy, 1 stationary enemy
5+ Behaviors: Perception (sight + sound), waypoint-based patrol, alerting boss enemy, search for player, chase player
Led the development of AI testing tools and coordinated tasks between disciplines to implement my AI features
This team had 50+ developers with 3 total game designers.
My Contributions: Enemy AI
Features I Implemented
Universal AI Behaviors
Perception: Sight and sound detection, Looking Glass debuff
Looking Glass function + debuff: Players can see invisible enemies, but they react negatively when looked at
Patrol: Walk around the house while making noise
Audio Feedback: Noise that enemies make will get louder and more distorted if player is detected, telling players if they are in danger
Enemy Types and Unique Behaviors
Boss Enemy — Father Jinn
Searches for the player (when detected) + checks hiding spots
Chases after player if they are detected for too long
Can kill the player if they are caught
Standard Enemy — Normal Jinn
Alerts Father Jinn to player's location if player is detected
Stationary Enemy — Passive Jinn
Same behavior as Normal Jinn, but does not patrol
Tech Used to Implement Features
Unity, Behavior Trees, and C# Scripting (for custom tree nodes)
My Design Process + Goals
Established design goals and constraints from game narrative
Wrote feature spec and reviewed it with design team
Implemented feature with Unity, Behavior Trees, and C#
Evaluated the feature's contribution to design goals
Iterated and polished feature based on playtest feedback
Enemy AI Design Goals + Constraints
Motivate players to engage in stealth gameplay
Discourage Looking Glass usage around enemies
Enemies should be mostly invisible
Only the boss enemy, the Father Jinn, can be directly hostile
Design Case Study: Enemy Perception
Feature #1 : Enemy Vision Cones
Starting the Process + Rising Issues
Design Constraint: Enemies need to be mostly invisible because of the narrative; players also need to understand when they are seen/heard
My Task: Promote stealth gameplay (sneaking around enemies) while preserving the above design constraint
Initial Idea: Vision cones for enemies should be circles
Design Intent: Players will exercise more caution around invisible enemies, so that extra caution should be taken into account
After implementing this initial idea, I watched live playtests and recordings to analyze player behavior, which revealed some problems:
Immediate Effect: Players were getting caught by the enemies even though they thought they were safe
Resultant Effect: Players did not engage in stealth gameplay, walking and running around the map because "it did not make a difference"
I realized that these problems arose because players were seen behind the enemies' natural sight lines, due to the of the circular vision cones. This prompted some action:
Actions I Took to Fix The Feature
Implemented 2 vision cones for enemies: a 15 to 40 degree vision cone for long ranges in front of the enemy; and a 360 degree vision cone for very short ranges (< 3m)
Results From These Actions
Players could sneak around the house without getting seen
Players felt anxious, clever, and satisfied when sneaking past the invisible enemies and therefore engaged in stealth gameplay more
Key Design Takeaway
Playtest to figure out player behavior; do not make assumptions!
Feature #2 : Looking Glass Debuff
Starting the Process + Rising Issues
Design Constraint: The Looking Glass is an artifact that "disturbs" the jinn because the user is peering into their world
My Task: Discourage Looking Glass usage around enemies
Initial Idea: Enemies' "anger level" should increase directly when a player looks at them through the Looking Glass
Design Intent: If players can understand that they are angering enemies directly, they would use the Looking Glass less
After implementing this initial idea, I watched live playtests and recordings to analyze player behavior, which revealed some problems:
Immediate Effect: Once again, players were getting caught by the enemies, but this time without being seen or heard (they were "spying" on the jinn)
Resultant Effect: Players were unable to complete exploration objectives because they got caught before using the Looking Glass in the right spots
I realized that these problems arose because players did not understand why the jinn were getting angry. This prompted some action:
Actions I Took to Fix The Feature
Replaced the "anger level" increase with buffed sight and sound detection ranges when players used the Looking Glass
This is what players thought was already happening!!!
Results From These Actions
Players used the Looking Glass more sparingly and therefore were able to complete the exploration objectives to progress the game
Key Design Takeaway
Simple gameplay solutions can involve designing around existing player expectations

