top of page

AI Director

Concept

Inspired by AI/combat directors like the one found in Left 4 Dead, I designed a dynamic system that adjusts intensity in this first-person action game, ensuring each playthrough is unique. The AI director responds to player actions, creating a constantly evolving experience. 

2025

Solo

Ongoing

ApplicationFrameHost_Bf4ftJkj3w.gif

Key Feature - AI Director

  1. Intensity System: Intensity is adjusted by player actions, such as combat, damage, and pacing, keeping gameplay varied.
     

  2. Dynamic Spawning: AI director spawns enemies in the next area and dynamically around the player based on intensity.
     

  3. Encounter Tools: Developed tools that allow level designers to set up encounters while maintaining dynamics based on intensity.

AI Director

Direcor-Top

My goal was to create a system that dynamically adjusts enemy spawns based on the player's experience and actions, ensuring a balance between tension and relief.

Designing an AI Director

This system follows a cyclical structure, progressing through three phases: buildup, peak, and relax, before looping back. During the buildup phase, the system monitors player actions to measure intensity, essentially tracking how much pressure the player is under. 

The AI Director spawns enemies at intervals, with enemy spawn frequency  based on the current intensity. Certain actions increase intensity:

  • Killing enemies (indicating combat engagement)

  • Taking damage (suggesting player struggle)

  • Moving too fast or too slow between checkpoints (preventing pace-breaking behavior)

Once intensity reaches a threshold, the system enters the peak phase, triggering a large horde to escalate tension. After the horde, the relaxation phase begins, reducing enemy spawns to give players a break before the cycle restarts.

The system uses a primarily a positive feedback loop, increasing intensity with player actions, and a negative loop to reduce intensity after major encounters, giving players a break.

Intensity calculations

Director-EnemySpawning

Enemy Spawning

I made two main types enemy spawn systems:

  • Spawning in the next section of the level when the player crosses a checkpoint.

  • Enemies spawned around the player to maintain pressure based on intensity.

Spawning Enemies in the Next Section

Each checkpoint has a designer-set standard enemy count for the next area. The current intensity (0-100) is mapped to a range (0.5-1.5) and multiplied by this standard value. For example, if a section has a standard enemy count of 6 and the player’s intensity is 80, the system maps 80 to 1.3 and spawns approximately 8 enemies (6 × 1.3).

Amount of enemies spawned in next area dependend on current intensity.

Section enemies spawn at predetermined points, each point linked to a patrol spline that the spawn enemy will patrol on. The specific spawn points used to spawn on are randomized when entering the section, ensuring the player never knows exactly where enemies might appear, which helps maintain tension and unpredictability. This allows level designers to set up encounters while being able to introduce some randomness.

Enemy spawn points with corresponding patrol spline.

Spawn Enemies Around Player

To spawn enemies around the player dynamically, I use the Environmental Query System (EQS) to ensure enemies spawn out of sight. These enemies can be either groups or single special enemies. They always know the player's location, charge toward them, and spawn based on intensity-affected timers controlled by the AI director

Many enemies spawned out of sight.

Spawning the Horde

I wanted to spawn the horde in smaller groups that approach the player in sequence. To achieve this, I use the EQS system to find suitable spawn points. By using a custom timer node with a customizable delay, I can spawn groups at intervals and, depending on the player's location, at different points that meet the criteria set by the EQS test I created.

Horde spawning in waves.

Enemy timers and spawning

Director-Playthrough

Gameplay Showcase

Director-Reflections

Reflections

This project was a great learning experience in dynamically spawning enemies based on player actions and understanding systems like those in Left 4 Dead. I want to keep exploring and refining this system to learn more and eventually use it in a full game.

I initially considered splitting intensity into target and actual intensity to better control pacing. This would have allowed me to ease off enemy spawns if the player was struggling too much. However, due to time constraints, I pivoted to a simpler system based on player actions directly adding to the intensity, which still kept the pacing dynamic. But this is something I really want to explore further

 

Creating this system made me realize the extensive playtesting needed to get it right. I adjusted the numbers to showcase it, but a full implementation would require much more time. Overall, it was a valuable challenge that taught me a lot about spawn systems, directors, and the work involved in making them feel good.

bottom of page