Developer Diary: Chris Kohnert
As we mentioned earlier, we’re going to continue giving you small snippets and insights into our development process on Shadowrun Returns. So this latest dev diary falls to me, Chris Kohnert. I head up the engineering efforts in our little office.
I think first off, it bears mentioning that Shadowrun Returns really is a pretty ambitious project. There’s a lot of depth and tactical strategy we’re trying to put into this game, while also keeping alive the fluid and dynamic elements that make a good story-based RPG fun.
One of the most important elements of any good single player game is a challenging and believable AI system. Since we’ve recently been tying up loose ends in the bulk of our core AI, I figured it would be a good time shine a bit of light into some of the elements of it, and how it integrates with some of the story-related gameplay elements of SR:R.
For this game, we have many different ways for you to approach any given scenario: do you try a frontal assault? Do you try to don a disguise and trick the guards into letting you into the server room? Do you need to protect that decker as he overtakes that computer node in order to take control of that mini-gun turret?
In order to facilitate this flexible approach to tackling a level, the AI must be able to interweave many different disciplines and game systems and respond to a lot of different situations. Let’s talk a bit about how this works at a very high level.
The very first thing an AI needs to do is to be aware of its surroundings. For instance, when you move around a scene and perform actions, a guard will make an “awareness” check (i.e. “Do I see him?”). This is where stealth, line of sight, and audible cues are sensed and perceived (and also where that awesome ninja suit might come in handy). Assuming the guard sees you, he must then make what we’re calling a “perception” check (i.e. “What do I notice about him?”).
This is where the non-combat elements of the game start to come into play. For example, if you’ve managed to procure a guard’s uniform, he may take a look at you and decide you aren’t a threat. Though, that uniform may not do you any good if you’re carrying a couple of assault rifles when the standard issue weapon is a pistol. (Yes, we actually model that level of sophistication! Though whether it gets into the final game is based on how much fun it winds up being. . .)
Oh and speaking of sophisticated, here's Chris Aardappel, who's taking point on the AI operation.
Once an AI has perceived you and identified you as a threat, it drops down into a high level planning system where it determines what types of actions it should perform. Things like staying near a VIP to protect him or her or barreling down the hallway to take out the interlopers are resolved at this level. This level of logic, in our system, is implemented using behavior trees. They can be very useful for choosing among high level alternatives and goals.
Next, it comes down to tools of the trade. And in this case, that means pulling out your gun or choosing to unleash that Force 4 fireball spell. Our system performs a weighted analysis of options available comparing the action points (AP) available, AP spend-per-action, potential damage, chance-to-hit, splash damage potential, friendly fire, etc. It selects the best option (or two) and queues it up to be performed. This may also involve moving to get in range (or better range) and/or possibly moving to take advantage of nearby cover.
Eventually it all lands in a low level system that is the nuts and bolts of driving the character around on the screen. Choosing which animation to play, how it meshes with the current state of the character (crouching and facing), which weapon(s) are equipped, whether and how much to turn and face... these are all driven by state machines, a simple, but trusted friend of any programmer.
When you put these parts together, it is a very powerful (but complicated) tool. You can see from the diagram that it manages to hook into many of the exciting gameplay elements we’re working on as well. We want to be able to build Runs that are your standard smash and grab, but also be able to play dress up and possibly sneak into a dinner party wearing that fancy suit, or to woo that bank cashier into giving you the extra details regarding the bank manager’s schedule without resorting to violence (necessarily).
One of my favorite features that might not be evident at first (it’s in that diagram if you look carefully), is the ability for a superior’s perception check to influence or even override those made by underlings. For example, let’s say you had a squad of Lone Star security guards and their commander protecting a genetics lab. If you manage to convince the commander that you belong there (i.e. pass a perception check) through, say, intimidation, fake papers, or even disguise, then when you encounter any of the guards later on, they will check with their officer as to whether you belong there.
If the commander says you’re good, the guard will just wave you on. Assuming, of course, that the guard has a high enough discipline trait. If he’s a slacker or doesn't trust (or like) his superior, he may just ignore his commander, and make his own check. This could be for good or bad, depending on whether he thinks you’re suspicious or not.
Currently, this type of “consult with superior” check is simply done invisibly behind the scenes for the sake of gameplay speed and flow. If you wanted a scripted scenario where the guard stops you, rings his commander, and then makes that assessment upon hearing back, you would probably want to dive into the trigger system and implement that kind of logic there.
We’ve come a long way on AI, but there is definitely a lot of work still remaining. We have a lot of different skills and abilities being coded up right now, so we’ll need to spend some time folding that extra logic into the various levels. We have to make sure the enemy Shamans summon things correctly and that mages will use that trusty Fireball I mentioned earlier without going unconscious from the strain. We’re also continually refining the overall believability of the AI to make sure it feels smart and fun while maintaining a proper challenge level.
That’s about it for my little peek behind the scenes. I hope it gives you an idea of what we’ve been up to on Shadowrun Returns!
seconds to go
Pledge $15 or moreYou selected
A Digital Downloadable copy of the game, DRM free on PC, Mac, or Linux + one totally sweet, exclusive desktop WALLPAPER for your PC, Mac, or mobile tablet.Estimated delivery:
Pledge $30 or moreYou selected
Previous reward + your character will start the game with a SPECIAL ABILITY only available to backers + a PDF version of the Shadowrun Returns Anthology, an ILLUSTRATED BOOK OF SHORT STORIES written for the game and edited by Jordan Weisman, the creator of Shadowrun. + NEW You will also get the IN-GAME DocWagon benefit of a fully-armed emergency ambulance or chopper to save your team of runners when the drek hits the fan.Estimated delivery:
Pledge $50 or moreYou selected
THE ALL-DIGITAL REWARD BUNDLE This reward bundle is completely independent of all other reward levels, does not include any previous rewards, and is not added to reward levels above. A Digital Downloadable COPY OF THE GAME, DRM free on PC, Mac, or Linux + one totally sweet, exclusive desktop WALLPAPER for your PC, Mac, or mobile tablet + your character will start the game with a SPECIAL ABILITY only available to backers + a PDF version of the Shadowrun Returns Anthology, an ILLUSTRATED BOOK OF SHORT STORIES written for the game and edited by Jordan Weisman, the creator of Shadowrun + you will also get the IN-GAME DocWagon benefit of a fully-armed emergency ambulance or chopper to save your team of runners when the drek hits the fan + a DRM-free digital version of the GAME SOUNDTRACK. This bundle includes no physical goods and helps with VAT, duty and shipping costs for our international backers.Estimated delivery:
Pledge $60 or moreYou selected
Previous rewards + a DRM-free digital version of the GAME SOUNDTRACK + a Shadowrun Returns "BACKER" T-SHIRT + a PERSONALIZED DOC WAGON CARD will be sent to your home + you will also get the IN-GAME DocWagon benefit of a fully-armed emergency ambulance or chopper to save your team of runners when the drek hits the fan. Note: This is an in-game service only. No armed medical extraction team will actually arrive at your home. More details in the FAQ. (Please add $5 for international shipping) Note: This is an in-game service only. No armed medical extraction team will actually arrive at your home. More details in the FAQ. (Please add $5 for international shipping)Estimated delivery:
Pledge $100 or moreYou selected
Previous rewards + A HARDCOVER EDITION of the Shadowrun Returns Anthology + your NAME IN THE CREDITS of the game AND the anthology book + a GOLD Doc Wagon card sent to your home. (Please add $15 for international shipping)Estimated delivery:
Pledge $125 or moreYou selected
Previous rewards + a DELUXE BOX EDITION including the game disc, soundtrack disc, a mini-poster, and—check this—a Shadowrun Returns USB Dog Tag set, containing DRM-free versions of the game (PC/Mac/Linux) and soundtrack (and maybe one or two other surprises, too). (Please add $15.00 for international shipping.)Estimated delivery:
Pledge $175 or moreYou selected
Previous rewards (excluding the All-Digital Bundle) + ALL 3 Shadowrun Returns "BACKER" T-SHIRTS. These 3 shirts are NOT in addition to the shirt you get at the $60 level. At this level you get 3 shirts total. (Please add $15 for international shipping)Estimated delivery:
Pledge $250 or moreYou selected
417 backers Limited (583 left of 1000)
Previous rewards + A SPECIAL EDITION, SIGNED & NUMBERED HARDCOVER of the Shadowrun Returns Anthology (this replaces the edition you get at $100) + EARLY ACCESS to the LEVEL EDITOR so that your shadowruns can be the first into the game (date for editor TBD). (Please add $15 for international shipping)Estimated delivery:
Pledge $500 or moreYou selected
100 backers All gone!
Previous rewards + the shadowruns you design will be MARKED with a special GLYPH so they'll be highlighted and easy to identify + a PLATINUM Doc Wagon card sent to your home. (Please add $15 for international shipping)Estimated delivery:
Pledge $1,000 or moreYou selected
41 backers Limited (9 left of 50)
Previous rewards + we'll use YOUR IMAGE to CREATE AN NPC CHARACTER for the game. It's our choice what NPC you'll be but if you have a suggestion, we'll listen.Estimated delivery:
Pledge $2,500 or moreYou selected
12 backers Limited (8 left of 20)
Previous rewards + we'll create the art for one EXCLUSIVE CUSTOM PLAYER CHARACTER based upon your description and/or sketches. When your friends hire your character, they'll get to see it too! (Limit 2 revisions.)Estimated delivery:
Pledge $5,000 or moreYou selected
0 backers Limited (10 left of 10)
Previous rewards + 1 Large or 2 Small custom art assets created for you to be used EXCLUSIVELY in your missions (Limit 2 revisions) + a CONSULTATION with our Art director and Level Designer to help tune one of your shadowruns.Estimated delivery:
Pledge $7,500 or moreYou selected
0 backers Limited (5 left of 5)
Previous rewards + spend the AFTERNOON AND EVENING at Harebrained Schemes World Headquarters. You’ll have LUNCH WITH JORDAN AND THE DEVELOPMENT TEAM and then PLAY SHADOWRUN WITH JORDAN. Your Game Master will be Mike Mulvihill, who led Shadowrun game development at FASA Corp. (You must be able to travel to Redmond, WA).Estimated delivery:
Pledge $10,000 or moreYou selected
3 backers All gone!
Previous rewards + Mike Mulvihill, who led Shadowrun game development at FASA Corp., will COME TO YOUR TOWN TO RUN A TABLETOP GAME OF SHADOWRUN FOR YOU AND FIVE OF YOUR FRIENDS. (He'll even buy some snacks.)Estimated delivery:
- (24 days)