Fighting illness, I come bringing Dark Void info

Sep 26, 2008 // Morgan

Hey guys,


Jason Hail, our intrepid AI programmer over @ Airtight, has written a small peek at Dark Void through the lense of AI. Here it is…


Howdy, Jason Hail checking in. I’m the Senior AI programmer at Airtight Games working on Dark Void. This last year has been a whirlwind of activity for us AI guys, and let me tell you: this game is big! We have ground combat, vehicular combat, aerial jet-pack based combat, vertical combat and some more surprises I can’t even talk about yet. One of the big challenges for me is to keep a handle on all of the different elements we have in order to stay focused on the core gameplay mechanics that make Dark Void great. It helps to look at the games that inspired Dark Void, and to pick apart what made them work. There’s one common thread I found in those games: great gameplay comes from iteration. You think really hard about how to make something fun. You polish the idea for months in your head. Then you try it in game. And, sadly, as great as it was in your head . it sucks to play. So, you have to start again. You come up with a better idea. A bit more cautiously, you try it in game. It no longer sucks; now it’s even kind of fun. So you refine it, let others play it, tune it based on their feedback. Now it’s even more fun. And so on, until you have a final product that absorbs the player from the moment they press START. Diagram 1. My highly scientific diagram of the evolution of awesome game play. Those first 4 steps can repeat for quite a long time.


OK, you say, So more work makes the game better. Tell me something I don’t know, n00b.

Well, the trick is how do you pack the most iterations into the tight schedule of making the game? Around the beginning of this year, it became apparent that with all the cool gameplay ideas we had for Dark Void we desperately needed a structure for creating and testing new AI quickly. I began reading a lot about different AI models, and one structural idea kept popping up: Behavior Trees. So, what’s a Behavior Tree?

A Behavior Tree is a structure that breaks complex decisions down into a series of small choices, which yield a set of concrete actions for your AI to carry out. As always, an (somewhat silly) example tells the story:

Imagine you’re a hungry AI. You have no sandwich, and worse yet you have no car! What to do? Well, you could get a sandwich from the fridge, but if you forgot to go shopping your fridge is empty. You have no car, so you need to find one. Maybe your parents would let you borrow theirs? If you drive like me, the answer is “probably not.” So, you’ll need to trick – oops, I mean convince – a friend to help you out. Maybe they’ll let you borrow their car? If not, perhaps they’d give you a lift to the store?

Our AI isn’t so concerned about sandwiches, but they are quite interested in killing you and your fellow Survivors. So, they approach the problem in much the same way: Do I have an enemy? If so, what means do I have to dispatch him? Am I hurt, and do I care that I’m hurt? Is there someplace strategically better to fight from? Questions yield even more specific questions, which in turn arrive at one or more actions to take to satisfy the problem at hand. At all times, the AI monitors the outcome of its choices. The AI can adapt the plan to changing world conditions, even remembering things for the future like, “How did that plan turn out last time? Did I succeed, or fail miserably?

We AI guys dream about stuff like making their AI totally self-aware and self-sufficient. However, designers still want to be in charge of finessing the game – and rightly so! Tell a designer the AI is going to go off and think for itself entirely and you’ll have one panicky designer. Our toolkit includes a home-grown Behavior Tree editor that allows designers to build and tune and preview their AI in (say it with me now) real-time. Along the way, as we add ever richer behaviors for the AI, the design team can pick and choose how and where to drop it in. Since there’s just one of me and there’s a LOT of AI to build for this game, it puts design in the driver’s seat and allows me to sit back and do important stuff like sit in meetings (just kidding, boss!).

I’ll try to write again soon. Thanks for reading along, and of course if you want to know more feel free to comment here. For now, a deadline looms and I have AI to teach. “Kill, boy! Kill! Good boy. Goooooood Watcher.”