top of page

Development Update - AI Vs. Scripted Events

Whats better? A dynamic AI or an orchestrated scripted event? Both have their pros and cons. Lets examine the difference between the two before we look at their pros and cons.

Scripted Events are a linear, predetermined series of events that unfold on cue. They're usually triggered by some kind of collision or trigger volume. An example of a scripted event might be something like "when the player enters the hallway, play scary music and make all the doors slam shut".

AI (Artificial Intelligence) is a term commonly used for NPC (non-player characters) where the character has some logic applied to them giving the illusion of independent decisions and thought driven actions. AI is a loose term in games. A true AI is capable of learning through repetition. AI in games is not generally a true AI. In most cases it's a simple list of conditional tasks. EG: If you can "see" the player, chase them, if not, sit down.

Now Let's take a look at the pros and cons.

Scripted Events:


  • Usually easy to implement

  • Will be reliable as there are no variables

  • Ensures the desired response from the player

  • Easier to apply custom music and sound effects


  • Will always be the same

  • If used incorrectly or too frequently, they lose their impact over time

  • Predictable



  • Will often surprise the player

  • Unpredictable

  • Can make for some very memorable moments that are personal to your circumstances

  • Increases re-playability

  • Everyone's experience will be slightly different

  • Will keep the player on edge not knowing what to expect


  • Difficult to implement correctly

  • Can sometimes have unpredictable results causing one off bugs

  • Much more difficult to orchestrate tension build and release

  • Requires complex systems for music and ambience timings

At face value you might assume that the more dynamic AI is the way to go. If you analyse other indie horror games out there, most use scripted events. My take on this is that horror games are usually less about re-playability and game play and more about eliciting a very specific response from the player, timed perfectly.

For Infliction I've decided to use a combination of both. I've implemented a dynamic AI that has the ability to trigger scripted events depending on the circumstances. What I've noticed thus far is that a dynamic enemy really keeps me on my toes during play testing because I'm never entirely sure where she is or where she might come from. It seems to trigger basic human fight flight responses when you're in a situation against a dangerous foe not knowing where they are.

In conclusion, I think both of these methods have merit and their place. It all comes down to what type of game you're making.

bottom of page