raven facebook page  follow raven on twitter
  • Blog
    • Studio Life
    • Game Craft
    • Releases
    • Developer Diaries
  • Games
  • Media
  • Culture
    • About Raven
    • Raven History
    • Our People
    • Outreach
  • Careers
    • Job Listing
    • Benefits
    • About Madison WI
    • Motion Capture / Voice Over Auditions
raven software
Blog  »  Developer Diaries

Artificial Intelligence Systems

06/25/10 @6:35 PM

Programming Singularity’s artificial intelligence was all about variety and usability. Providing compelling tactical AI was just one small part. We also needed melee and creature AI, and the AI had to interact with super-powered sci-fi attacks. Additionally, a large part of my job as an AI programmer was providing designers with flexible, powerful tools created to ease the set up of multi-stage, varied combat.

In order to accommodate as many different types of AI as possible and still share code between them, we developed a data-driven hierarchical finite state machine, or HFSM. We also created a visual editor for these HFSMs so AI programmers and technically-minded designers could rapidly prototype and fine-tune AI. Using the editor, it is easy to pick the states an AI should use, like “Cover” or “Melee Attack.” Then you can arrange those states by priority and configure parameters governing their behavior. For example, you can change the preferred distance between cover and the AI’s current enemy. This allowed a minimal amount of code to manage different AI, and made behavior iteration really efficient – you could even change AI behavior as the game was running!



For tactical combat, it’s a fact that a game’s AI is only as good as its scripting, so it was essential that we provide tools to designers to make it easy to set up compelling combat. We took several steps to make it easier to spawn in AI, and to instruct them how to advance towards the player, fall back, or bring in reinforcements.

Here’s an image of a combat space without any AI information:

Now here’s an image where you can see several different things we’ve done to help our designers and scripters guide the AI.

In the image, you can see the cover nodes placed behind the barricades, with both the actual cover spot in red, and some nearby spots in blue, which the AI falls back to if it can’t get a good shot at the player. We added this to help the AI be effective without breaking them out from the “cover” state.
The pink cylinders represent regions or “tethers” to which the AI can be restricted by our designers. Then, when certain conditions are met, the script can tell the AI to move forward or fall back.
Finally, the soldiers you see represent special nodes where the AI knows to play a custom “jump down” animation when they want to move to the ground below. This gets automatically cooked into the path-finding information.

Here’s the final result, where you can see AI using some of the cover nodes in this area:

This is just a taste of some of the things the AI team worked on to make Singularity. It has been a very rewarding challenge to develop the AI for the game. I hope you enjoy the end result as much as we enjoyed making it!

Willie Ryan
Senior Software Engineer
Raven Software

More Developer Diaries

  • 07.14.10 THE WEAPONS OF...
  • 07.12.10 CRANK IT UP
  • 07.09.10 THE ORIGIN AND...

Blog Posts

  • 01.23.12  MOTION CAPTURE HEROES in BLOG POSTS: GAME CRAFT
  • 01.17.12  WINTER FROLIC 2012 in BLOG POSTS: STUDIO LIFE
  • 11.07.11  WE'RE OSCAR MIKE in BLOG POSTS: RELEASES
  • 10.31.11  HALLOWEEN 2011 in BLOG POSTS: STUDIO LIFE
  • 10.18.11  EXTRA LIFE 2011 - RESULTS in BLOG POSTS: STUDIO LIFE
  • 09.12.11  THE GAMES PEOPLE PLAY - PART I in BLOG POSTS: STUDIO LIFE

Games

  • 06.29.10  SINGULARITY
  • 08.18.09  WOLFENSTEIN
  • 05.01.09  X-MEN ORIGINS: WOLVERINE
  • 10.24.06  MARVEL: ULTIMATE ALLIANCE
  • 10.18.05  QUAKE 4
  • 09.20.05  X-MEN LEGENDS II: RISE OF APOCALYPSE

Media

  • vid  OVERWATCH MAP - OFFICIAL CALL OF...
  • vid  UNSEEN HEROES
  • vid  OFFICIAL CALL OF DUTY®: MODERN...
  • vid  OFFICIAL CALL OF DUTY: MODERN...
  • vid  RAVEN SOFTWARE HALLOWEEN
  • vid  OFFICIAL CALL OF DUTY: MODERN...
© 2012 Raven Software
About Us | Blog | Privacy