ON The Insider: Jessica Alba Looks Hot at the ALMAs
CNET Networks Entertainment:
GameSpot
GameFAQs
SportsGamer
MP3.com
TV.com
Metacritic

Vampire: The Masquerade - Bloodlines Designer Diary #7

Programmer Dennis Taylor explains how vampires and humans alike will be powered by artificial intelligence.

Though there are a number of high-profile role-playing games on the horizon, one of the most tantalizing and intriguing is Vampire: The Masquerade--Bloodlines. The game, which is set in the rich role-playing universe of White Wolf's popular Vampire: The Masquerade pen-and-paper game, is powered by Valve Software's Source engine, the same technology being used for Half-Life 2. In Bloodlines, you'll be able to play as a vampire in the Los Angeles underworld, interacting with the various clans while you choose your own destiny. In the latest chapter of our designer diaries, programmer Dennis Taylor tells us about the game's artificial intelligence and how humans and vampires will behave realistically.

Smart Vampires

Dennis Taylor
Programmer, Troika Games

The artificial intelligence in Bloodlines is broken down into several core components. Anyone who has worked with the original Half-Life or Quake scripting language will recognize the core elements (even though much of the code that controls these elements underneath has changed). Most of the AI's work is done by conditions, tasks, schedules, and states.

Conditions are the AI's representation of the world around them. They mark things that a non-player character might choose to react to. This includes more mundane things like sight and hearing. It also includes more conceptual things, such as whether the NPC would like to block an incoming attack or whether it can pounce on the player. These conditions are used to switch NPCs between the different states and between different schedules within each state.

Tasks are tiny chunks of functionality that an NPC can perform. A task might be telling the NPC to start using a specific animation, to fire a weapon, or to find a path to a target.

Schedules are lists of these tasks, and they provide a general action for an NPC to perform. For example, there can be a schedule to perform a melee attack on an enemy. In order to do that, the NPC would need a task to find a path to the enemy, a task to walk to the enemy, a task to face the enemy, and one to swing its weapon. At any time, a condition can interrupt this schedule to allow the NPC to respond in a timely manner to important events. If an NPC is walking to go press a button, you probably wouldn't want it to continue if it got shot on the way there. At that point you would want it to run away or fight back or even die.

The final element in the AI code is the state. A state is the highest level of the elements. It determines in general what types of actions the NPC is looking to perform. An NPC can be in an idle state, doing whatever it is normal for that type of character to be doing. While in an alert state, the NPC is cautious or expecting something to happen. Or an NPC can be in a combat state, actively attacking an enemy.

Currently, our AI has the following main states:

  • Idle: NPC is going about its normal routine--walking about, patrolling, or talking to buddies.
  • Alert: NPC is alerted to the player's presence. NPC investigates foreign sounds and sights.
  • Combat: NPC is actively engaged in combat with an enemy.
  • Hunting: NPC was in combat, but lost track of the target. NPC combs the area looking for its target again.
  • Fleeing: NPC is afraid of someone or something and will run and hide in a corner.

prev

1 Comments

  • jakeboudville

    Posted Sep 6, 2006 4:50 am PT

    really impressive

    • Login to rate this comment
    • 0 of 0 users agree
advertisement

Related Unions

Game Stats

advertisement