Object interactions

by Jason Sams, Lead Developer

We have been hard at work creating missions. Part of this work has been to test our model of how the player interacts with the world in-game. We have talked about combat interactions in the past, and this month I’d like to cover the non-combat interactions.

We use a five-segment menu for our interactions with the world. The center action is the default action. If you quickly left click an interactable object it will select this action. The mouse cursor changes to reflect this default action. This is to allow the player to know what will happen without having to wait for the menu to appear.

Around the center there are other actions that will appear after a very short delay. The bottom option will always be examine. We always show this option, even for non-interactable objects to avoid leaking which objects are interactable and which are not.

On the right we will display an aggressive action, if applicable. For example, break down a door, attack an NPC, or trip a trap. The option displayed will change with the object. The available options are set as part of the object editor.

For the other options we will place a stealthy action on the left, if applicable. For example, sneak if moving, lock-pick to pick a lock. On the top will be a neutral action, again if applicable. Examples, knock on a door if locked, lock if unlocked.

Locks:

Doors and containers may be locked. Once you are close enough to interact the cursor will change to a lock if this is the case. Each item will have a lock type assigned which determines which skill (usually electronics or lock-picking) will be needed to pick the lock. In addition difficulty and sigma (see Alex’s post for info), will be set.

Traps:

Items may also be trapped. By default a trap will not be shown unless a character passes an appropriate detection skill check. Once detected, a trapped object will show as trapped, until then it appears normal. The default action for an object, known to be trapped, is to do nothing. This avoids accidentally triggering a trap the character knew about. A trapped object will have three interaction. Examine, disarm, and trip.

Disarming a trap will require a skill check. Success will disarm the trap. Failure will trigger a second check to determine if the trap is tripped. Once disarmed or tripped, the item is considered normal and will return to appearing to have normal function.

Travel objects:

In Spy DNA Spy DNA we have a category of objects used for covert travel. For example ventilation ducts. By default you won’t know where the ducts lead unless you have mapped them during infiltration or via exploring them. Some will require a check against attributes (ex: dexterity, flexibility). A failed check will remove that path as an option for that character. Other character will be able to try, if desired. While attempting the travel the character will be removed from the map and unavailable. Upon a successful transit, the path will be marked and available for that character to use again if desired. Other characters attempting would need to pass the same attribute check.

The last category of object is called “custom.” These are unique objects where the options are entered in the item editor. We support overriding all the action slots except “examine” as the bottom option. Custom menu options are used for story-line objects or objectives. Our level designer can use them to trigger unique events as needed.

I hope this gave everyone an idea of what you may be doing when not in combat or talking with NPCs.

Dialog flows and skill checks in Spy DNA

by Alex Maier, conversationist

Over the past few weeks, we focused a lot on combat in our game, but there’s another aspect to it: dialog. In Spy DNA you can talk to members of your party as well as NPCs, both at the base and during missions. While some missions have combat at their heart, others can be completed, or at least aided, by talking to people.

In the full release, you’ll be able to complement your Commander’s skills and attributes with those from your party. If the character you create lacks in stealth, charm, or ability to hit targets with any weapon, one of the nine specialist PCs can fill the skill gap and help you succeed.

In the Demo release, we’ll be including a few mission scenarios, and a limited complement of PCs to accompany you. Because of this, my goal as writer/level designer is to provide you with many different options to complete the missions where the combat-oriented PCs can’t help, to make any kind of Commander specialization viable.

Right now, I’m working on a covert mission where you’ll encounter only civilians, and if you screw up badly enough, civilian law enforcement. You’ll be under strict orders not to engage any civilians, and will fail the mission if you do. This means that you’ll have to use radically different tactics here than you would say, on the mission to extract the hostage from a remote rebel camp.

If you can’t shoot’em… talk to them, I guess?

If your Commander is an infiltration specialist, you’ll have no problem convincing the people you speak with that you’re just an employee of the company you’re infiltrating. The security guards will let you stay and complete your task in peace.

But what if your Commander is more of a breach-and-clear kind of person? This is where level design becomes interesting. To provide a combat-oriented Commander with a viable approach, I’m including options to intimidate your vis-a-vis, if you couldn’t charm your way out of a wet paper bag. In addition to tough talk, your attire will also be taken into account, as will your other choices, which I don’t want to reveal quite yet.

To account for all the possible combinations of Commander abilities and under which circumstances they engage the person in the conversation, the dialog is very branched, and can have a variety of outcomes for the player. Here’s an example of a mostly finished dialog with a security guard in the building. It’s about 80 percent complete, so just imagine another branch or two in there.

Dialog tree example for an NPC on a generated mission

Other NPCs in the level will have similarly complex dialog trees, and in each case, I’m aiming to provide options for a combat-oriented character to have a chance of success. Mind you, this will not be a requirement for generated missions in the full release, since you’ll have a full complement of specialist PCs in your squad, to help you get through the missions that your Commander wasn’t designed for.

While failing or skipping a generated mission isn’t going to endanger your overall objective of saving the world (as one does), storyline missions will have to include solution options for Commanders of all kinds. They may not be the most obvious ones, and may require a bit of planning ahead, but I’m determined to make sure y’all don’t get stuck because of choices you made during character creation.

Skill checks

As you’d expect, picking different dialog options and interacting with objects in the world results in a skill check which in turn decides whether you fail or succeed. You’d be “rolling” against the skill relevant to your selection (infiltration, intimidation, lockpicking, etc), but we also factor in an attribute, which gives you a chance to succeed if your skill is zero. The flip side to this is that an extremely poor attribute will generate a penalty.

The skill roll is also modified by Sigma, to set how steep the success/fail curve is. The smaller the sigma, the smaller is your margin from the number you’re rolling against. This means that you’ll experience a critical failure or a critical success with sigma of five more often than with sigma of twenty. Smaller sigmas are reserved for more daring checks, such as last-ditch attempts to convince that night guard that you’re not breaking in.

X axis represents difference between your skill and the difficulty of the task

In the dialog example above, you’ll be checked against combinations of infiltration + leadership, infiltration + charm, intimidation + strength, or persuasion + mental quickness, to name a few. I select the attribute according to dialog context and common sense, to create the closest approximation to real life we can within our system.

While making your choices, you’ll usually have more than one attempt at succeeding within the dialog branch that you chose, but the guard will remember your choices, and you won’t be able to just quit the dialog and attempt a “redo” a moment later. That’s not how life works.

And on that cheery note, let me wrap up here and go back to writing those dialogs, instead of blog posts. Post your questions below or tweet at us, we’re happy to explain stuff in more detail if you’re interested!

Life after Kickstarter

By Alex Maier, writer of words

It’s been just over two years since we’ve concluded our Kickstarter campaign, without hitting our funding target. If I said that we were completely unfazed by this setback, I’d be lying, but despite the disappointment we decided to continue on with the project anyway.

As the new demo and early access are drawing closer, I felt a bit nostalgic, so I began to compare our actual progress to the goals we set out to hit two years ago. And you know what? That made me feel good. Aside from having to push out our release dates, we’ve stayed largely on course.

Also, it helps to remind ourselves just how far we’ve come in those two years. So let me take you along for a trip down memory lane, beginning with the Kickstarter video.

First off, I gotta say, thank you Denis for kicking my butt to create our current logo, it is definitely better than what we had back then.

Spy DNA screenshot August 2016

Spy DNA screenshot, August 2018

We’ve also improved the UI to make it look more like a sci-fi game. Gone are the sharp rectangles and mostly gray-on-gray elements, but on a deeper level, we’ve also streamlined the way our players interact with the game.

Lab tech Oxalana Guy before and after

But one of the changes most noticeable to me are our new character models, unique guns, and the look of the in-game world. Then there are things like large landscapes with literal thousands of trees on them rendered at high FPS rates, and level loading times of 10-15 seconds. In our playthrough video, you can see how quickly a 1 x 1 km map loads.

Now, let’s look at the game we’ve promised to you when we launched that Kickstarter campaign, and how we did on each point.

Super-realistic combat and AI make you feel like a real super-spy on a mission
If you watch our latest mission playthrough demo, you’ll see the realism in action, and in a little bit of time, you’ll be able to try it out yourself when we release the new demo

Realistic weapons behaviour, aiming, and cover
We account for character stats, time spent aiming and recoil when calculating shot accuracy, and we take projectile velocity and total energy plus aerodynamic drag when calculating damage. We use actual line of sight for determining which parts of the target are in cover and which can be seen and shot at.

He's got his heart in the right place, so you can aim for it

Hit points replaced with anatomical damage
We’ve got per-polygon collisions enabled for characters, so we know where they get hit, and if the bullet has been stopped by cover or armor. We’ve additionally filled our character models with collision primitives that represent different organs and parts of the skeleton, and base the actual physical consequences of getting shot on what parts have been hit.

Dynamic turn duration based on character stats; turns execute at the same time
Yep. Got that one.

Immersive story and deep branched dialog
Okay, you’ll have to basically take me at my word on this one, but that 200-page script that I was showing off in the KS vid is still alive and kicking. It's been expanded quite a bit, and we’ve added Lua scripting support to the dialog, to make the conversations have real effect on the game.

Rich character attributes and skills allow you to create and play a character based on your own play style
While some games try to simplify everything down to just a couple stats that have to stand in for a bunch of marginally-related skill checks, we’ve gone the opposite way, providing the detail and granularity to help the player have a clear understanding of what their characters are good at.

Character creation August 2016

Character creation, August 2018

High tactical flexibility creates replay value
When we wrote this sentence, what we had in mind were static, hand-made levels where only the NPC placement and their actions would vary on each playthrough. Today, we’ve taken this idea much farther: to generating all the levels procedurally, based on mission scenarios that we create in our Editor tool. In today’s version of Spy DNA, you will have a different map each time you replay a given scenario/mission, and the mission objectives won’t alway be in the same spots, so you have to approach each mission individually.

Gratuitous picture of two Spy DNA agents shooting the same target at the same time

As you play, you will encounter two types of scenarios: storyline missions and side quests. The storyline missions will be required for you to complete the story arc, while the side quests are one-off missions that you can take (or leave) between storyline ones. Storyline missions will feature unique dialogs and allow you to develop relationships with the members of your squad, who we’ve made as different from each other while still being useful for the team, as we could.

Side quests will be based on several different scenarios, which, coupled with a unique map generated each time the scenario comes up in your intelligence screen, will provide you with hours of challenging levels to beat.

The demo will ship with only a handful of scenarios and none of the storyline missions, but you’ll see the first few story-arc levels in the early access release.

In addition, we’ve also built a few things from the stretch goal list: guns that you can customize in-game, and recorded voice-over “barks” for our squad.

So while we’re going to be shipping the game quite a bit later than originally planned, we’ll be shipping the game we promised we would, and in some aspects, it will even be a better game than we ourselves could anticipate back in 2016.

Let me wrap up here before I pat ourselves on the back too much. Please subscribe to our newsletter and follow us on social media to make sure you know when that demo will be ready for you to download and try out.

New demo update

We hit an important milestone a few days ago: Now we can play missions all the way though, which starts when a mission is generated at the base, continues to mission planning, infiltration and team selection, mission execution, and finally, return to base.

Here’s a video we made of the full mission sequence all the way through successful completion.

At this point, the development here at Shy Snake has shifted gears towards stabilizing and polishing the release. Here is a quick list of the top issues resolved this month:

1: Added grass and ground cover to generated maps
2: Addressed performance issues with having lots of trees on a map
3: Added the mini-map in the HUD (For the body-cam fans, don’t fret, it is still available)
4: Fog of war visualization on the map
5: Viewing characters when obstructed by building walls or roof
6: Loading times optimization

We’ve been optimizing our development for the end goal of shipping the Spy DNA game. So we have often delayed or skipped short-term objectives if they didn’t help to get us to the end goal. As a result we are a bit behind on the playtest, but pretty much on schedule for the demo and early access.

Here’s a view of our internal bug tracker:

Let me explain what these milestones mean to us.

First playtest:
At this point we feel the game is mechanically complete. The core player experience is in place and should give the player a good representation of what to expect in the final product.

First demo:
Everything in the playtest with more mission and character progression. Save/Load must be robust and the base fully functional.

Early access:
Everything in the demo plus access to the full party. The first chapter of the story line has to be playable and several side quests need to be finished. A lot of the bugs in the 0.4 bucket are not necessary for 0.4, we just haven’t created the 0.5 bucket yet.

During early access we will be adding content and polishing the animation and AI systems along with fixing any issues that come up.

We had a few bloopers getting ready to record the video. In one case, I wanted to make sure when a character went down they dropped their weapon. But I forgot to mark the weapon dropped in one case and this happened.

Then while recording the playthough a few missions failed painfully early.

So with that I will leave it, and please enjoy the first public video of a full mission playthrough.

Maps in Spy DNA

By Jason Sams, Lead Developer

We have been hard at work making the maps in Spy DNA look and perform better. We had a few objectives for improvements in our maps:

  1. make the maps look better
  2. increase the size of the maps
  3. decrease level load times
  4. provide a mini-map
  5. include area maps for mission planning stage

The first major change we made was to increase the amount of decor on the maps. In spy DNA decor items (trees, rocks, signs, roads, etc) serve both to make the map visually interesting, but they also give the player and NPCs cover.

We have also increased the size of the maps. When we tested the various maps, we noticed that the buildings that were necessary for the mission were occupying too much of the area, causing the player to start near the building and so limiting the choice of approach.

This was happening on the small maps, usually 256 x 256 meter in size and smaller. So we have scrapped the sub 256-meter maps and most missions will now default to a 512 m or 1 km map. Some missions will now default to 2 km. 

Those of you that have played the demo might be wondering about the load times on the large maps. We have overhauled the code that generates the map which has greatly reduced the time it takes to load a map. Now the 1 km maps load about as fast as the old 256 m maps and there is no longer a significant difference on load times on maps smaller than 1 km. Even the 2 km maps are now loading in under 30 seconds.

The new code is split into two sections. There is the map itself, and now the Unreal Engine visualization of the map is separate from that. This allows us to do something neat: We can now show the map of the mission area during mission planning at the base. This has also opened up some new options for infiltration such as scouting options to identify points of interest on the map.

This same map is used for the mini-map during a mission. You see a lot of trees on the mini-map right now as we are stress-testing the system.

Because a map with this many trees would normally make it impossible to see your party, we will hide the leaves when you have the camera looking down. The vegetation will progressively fade away as the camera moves higher, resulting in a view like this.

This will let you keep tabs on your whole party and any NPCs that they can see. The fog of war will still apply and hide NPCs if no-one in your party has a line of sight.

That’s it for my update this month. I hope you have enjoyed the screen captures from the game. Next month we should have some video with live missions.

Spy DNA Development Update: Character creation

By Jason Sams, Shy Snake Lead Developer

Let’s talk about that all-important part of an RPG, creating your character. Last month I wrote a post about complexity in games. Character creation process in any RPG is usually the first thing the player does, which affects every aspect of the player’s experience afterward.

In order to get to the character creation, you need to go to a job interview with Dr. Crotalus

This presents some unique challenges to a game creator, or even a DM/GM.

First, you’re asking a player to design the character they want to play, having no knowledge about how your game works. For most people this means taking a guess, playing a bit, and potentially starting over.

Second, the choices made during character creation are typically permanent, and affect gameplay for the full playthrough of the game.

As a GM for a pen-and-paper game this was particularly difficult. The players would make their characters, and usually 3 sessions in, we’d be tweaking them, as players realized that the characters they wanted to play weren’t what they actually created.

So as an experiment, I had everyone make two characters. One was created the traditional way, rolling dice and allocating stats and skills on a character sheet. To create the other character, I gave everyone a list of 23 questions to answer for me before the game. Then I made characters for the players based on their answers, using my knowledge of the game world and rules.

The players could freely pick which character they wanted to use for each mission, given they were alive and well enough to go. You’d expect that the players would favor the characters they made for themselves, but instead they played the characters made by me, the GM, about 80% of the time, only breaking out the other character for special situations. Why?

As a GM you have more knowledge of what lies ahead for the players, what they will need, and typically how the system works. There is much less guessing. So as long as you know what kind of character the player wants to play, you’ve got a much better chance of creating one that will work well for the game.

Based on this experience, we wanted to replicate this character creation process in Spy DNA.

At first, we created a set of 21 questions with about 3 answers each, and then used that to configure the characters. And it was terrible. There simply wasn’t enough detail in the resulting playable character.

So we went back to the drawing board and came up with a new design pattern for the questions that was more suitable to a computer game, i.e. it didn’t require a human to read between the lines in the player’s answers.

Now in Spy DNA the character creation consists of three groups of questions:

1: Self: How you think of your character.
2: Favorite mission: What kinds of missions you prefer.
3: Approach: How do accomplish your goals.

Within each group we now start with a high-level question, and follow up with a refining question depending on the previous choice.

You can make your own character by answering a questionnaire

Under this model, you will see roughly 17 questions as part of character creation. However, there are more than 80 questions in the questionnaire, so any single pass will only see a small part of the whole. At last count, there are more than 230 answers to choose from during the creation process, each with a different effect on your character.

To test whether this system actually works as intended, I have been asking people to think of a character they want to make, then try using the questionnaire to create it. Afterward, we look at how close the resulting character is to what the player intended, and the results have been vastly better than with the old 23-question system.

It being us, we used this opportunity to take things a bit farther. As you go through the character creation questionnaire, we record the choices you make. Those become part of your character’s persona. They will influence how other characters react to you in-game. As an example:

Q: Which type of mission are you the most comfortable with?

1: Assassinations: Neutralize a single target using a variety of means.
2: Counter-terrorism: Aggressive combat tactics designed to neutralize a group of enemies before they can do harm.
3: Breaking and entering: Quietly break into buildings, avoiding detection
4: Asset manipulation: Recruiting and convincing assets to work for you.

You can see how this may both influence the type of missions your team were to receive along with how some characters, including those in your party, may respond to you.

You can select a pre-configured character to play

The character creation system in Spy DNA is designed to help players create a character they will enjoy playing, but you don’t have to use if if you don’t want to. In addition to the questionnaire, you will also have an option to play a pre-made character, or use the traditional system where you can directly assign the points (probably not included in Early Access).

Complexity in games

By Jason Sams, Lead Developer

I want to talk about complexity in games. I think complexity is a very misunderstood subject. Game developers are sometimes seeking to “simplify” where there’s no need, while at the same time adding complexity without realizing it.

What is “complexity?”

When I say “complexity,” I mean specifically “perceived complexity.” In other words: Is the action considered easy or hard for a human to accomplish?

Here’s a practical example: If I asked you to throw a ball at a target, would you consider that a complex or difficult task? Probably not. However, hitting a target with a projectile is a task complex enough that solving the math behind it drove the creation of the first computers.

When video games were created, lobbing projectiles at things was a rich enough subject that entire games were built around the idea, such as Artillery Duel and Scorched Earth.

Let’s look at a more recent example. Is driving a car complex? Most people consider it so easy that they do all sorts of other things while driving. Yet teams of engineers are still struggling to teach a computer to do the same thing. Analyzing visual data is so challenging, that they have to use additional sensors (Lidar) that humans don’t have, or need. Objectively, driving is very complex and yet it’s still easy for humans.

And again many games are built around the idea of driving (or flying). Most of those games are considered very easy to pick up and start playing. Perfecting your technique and winning is the real challenge.

What about an opposite example? Multiplying large numbers is so simple even a phone can do it a few billion times per second, yet ask a human to do it and many would rather drive to buy a calculator. No one would make a game like this outside of education.

In context of game design, we’re interested in complexity as perceived by a human player. In our case we are specifically interested in making the mechanics of the game easy to grasp. This idea has been a driving factor in the design of Spy DNA and is also the reason for us calling the game a Simulation RPG. (Side note: it’s also led to way more UI iteration than we ever envisioned.)

Our combat system is designed to be the best simulation we can make of combat. We chose simulation and not the traditional turn-based approach to solve the problem of perceived complexity vs. actual complexity.

I’m a big fan of realism in games. Nothing will frustrate me more than when something happens in a game that makes no sense in the real world. Some examples:

1: You move a character one step forward, you trigger an enemy group, that now all get to activate, move several times farther than your one step, and possibly attack and kill your character. All this before you can even react.

2: You find a new item in game, yet you can't use it because of some attribute or skill check. The worst ones are the cases where you lack “strength” to wear an item, yet, toss it in the backpack and you can be lugging several of them around despite them being harder to carry that way.

3: You sneak up behind a target and make a surprise attack. You stealthy weapon fails to penetrate the armor despite hitting a spot where there was none (visually). The enemy then turns around and kills you.

What all these things have in common is they are results of artificial rules imposed by a game system that don’t exist in the real world.

Human brain is very good at understanding natural things such as physics (throwing something), or processing an image, but dealing with large numbers of artificial rules is not something that comes to us naturally. Therefore games that go down this path are perceived as complex for the player.

Not all complexity is necessarily bad. There are many popular games built around artificial rules, chess being the first that comes to mind. Add a little random input and you have pretty much every card game ever. In these cases managing and exploiting the rules becomes the focus of the game.

In Spy DNA, we want you to feel like an agent in a believable world, where things that should work actually do work in-game. Or put another way, we wanted the combat system to be intuitive and realistic. We wanted the game to be about Spy DNA world and not about the combat mechanics.

When you play Spy DNA, one of the things you will notice is that we have a lot of attributes compared to most RPGs. I’ve heard people give talks saying that six attributes is too many for an RPG, and I consider that silly. I mean, if a console sports game can have 38 attributes (MLB the show), I don’t see why a serious PC RPG shouldn’t have more than 6.

Yes, this is a scroll bar in the attributes screen!

This is where we clearly see the difference between perceived vs. real complexity. By all accounts the simulation in the MLB game is more complex, but because each attribute is clear and easy to understand and relate to in real-life terms, it never feels difficult to understand or play.

By comparison, when you have too few attributes, the attributes have to stand for things that are not obvious from the name, such as using dexterity for speed, strength for hit points, or intelligence for spellcasting. Each game has a slightly different system, making it necessary for the player to learn a new set of artificial rules with each game. Learning abstract rule sets is a thing that humans aren’t very good at, and therefore perceive it as complex.

How could having more attributes actually make a game seem simpler? The primary way is to map the attributes to “things a human intuitively understands.”

In Spy DNA we have 21 attributes in 7 common groups. We use groups, so that players used to traditional RPG systems would immediately be comfortable. The groups simply provide the average of the sub-attributes for quick reference and ease of picking up the game for those familiar with other systems. Within each group we provide the details, so it’s intuitively clear what’s really going on.

Screen capture of Spy DNA character attribute screen

Let’s looks at dexterity, using the party sniper, Zoe, as an example. At a glance you can see at 81, dexterity is a strength for the character, as you would expect for someone specialized in ranged attacks. However, with our focus on being realistic, we break down dexterity into Dexterity, (could also be called manipulation), reaction, and flexibility. In this example the character has a clear specialization. You can also see from the description she has a “+40 enhancement”. This comes from the genetic enhancements which put the “super” in “Super Spy”. As a result of these you can end up with values in excess of the natural human limit of 100.

Reaction is simply reaction time and impacts reactive movements (duh). In-game it will make you harder to hit in a melee fight, and help with any other action that depends on quick reflexes.

Flexibility is important to martial artists or characters that want to sneak past alarms or hide in places you wouldn’t assume someone normally fits. 

By being explicit about the common traits that a character may have, it should be actually easier to parse what the attributes actually mean for gameplay. We feel that this is better than a giant array of perks because it’s clear and straightforward.

When it comes to combat, we try to simulate the world as it is, and not require people to learn a unique set of made up rules just to play Spy DNA. Let’s take cover as an example.

In some games cover is measured in increments (high, low, none), or as a percentage. In these examples the cover makes it proportionally harder to hit the target. So far so good. Now you need a mechanism for attacking a target in cover. So these games introduce the idea of “flanking”, or moving to a position where the cover doesn’t apply. Typically these are done on an all or nothing basis, leading to frustration as your character can clearly see and hit the target, but because you have not triggered the arbitrary rule that says you’ve “flanked” your target, you still miss.

In Spy DNA we deal with this in a straightforward way: if you can see it, you can shoot it. Humans understand intuitively that the more of a target is exposed, the easier it is to hit. How much easier? We solve that problem visually. We present the player with a picture of their character’s viewpoint. You see what is exposed, what the area your shot might land in is, and you make the call based on that. Visual and intuitive.

Screen capture of the gun sight cam, showing circular error probable values

I also want to talk about cover vs concealment in Spy DNA. A real-world consideration is: “Will this thing I am using for cover actually stop the bullets?” If the answer is no, it’s not really cover, but just concealment. You might use a couch or a thin door as cover, but those will only slightly reduce the energy of the shots. So if the enemy gets lucky or guesses where you are on the other side, you’ll still have a problem. The flip side of this is, that if you have a weapon with a high rate of fire and have a general idea where the target is hiding, you may be able to get them through their concealment. Just like in the movies.

This leads to the next bit, damage. In most games once you hit a target, there is a random roll for damage, and possibly a separate random roll for a “critical.” So back to that early example on math, most humans don’t have an intuitive feel for complex equations that don’t mirror something in the real world. So instead of having a good grasp of the actual probability of hitting and damaging a target, players have to develop a feel for a weapon’s effectiveness based on trial and error.

In Spy DNA we invert this equation. Damage is 100% deterministic once you hit a target. How much damage you do is based on three things.
1: What hit the target? Ex:type of bullet, fragment, knife, fist.
2: Where did it hit the target? Ex: head, arm, leg
3: How much energy did it have when it hit? More is better (for the attacker)

Those concepts should be very easy to understand, nothing feels complex about it. However, the actual simulation is very complex. It only takes a few lines of code to implement hitpoints. To simulate injuries, we have thousands of lines of code in Spy DNA. 

Spy DNA uses per-polygon collisions to model wounds on a character

Our models have multiple colliders so we can not only figure out if you hit your target (which we resolve per-polygon against the mesh), but also what part of the target you hit. Then our damage code takes over and models a wound based on the results. 

This creates interesting situations in-game. Looking over cover is still dangerous, even though you’re 90% covered. Why? Because if the enemy lands a shot, it’s the exposed part that gets hit, which in this case is your head. Sticking an arm out would be much safer.

The last bit I’ll talk about is the passage of time. Most similar games have made the decision to be turn-based. We are a simulation, which means every action you take, takes some amount of time. When in combat, time in Spy DNA only passes while you are doing something. The most similar game I can think of is SuperHot with their tagline “Time moves only when you move.” Time will pass for both you and the enemy when everyone in your party has something to do, even if that something is just wait.

Because you want to be able to react to the changing situation in-game while your character is performing their action, we allow characters to react to perceived threats. A character that spots a new threat will cause the time to immediately stop, so you can change your orders if you desire. This mechanic takes the place of the various “overwatch” systems that most turn-based games have.

The ability to stop time when new threats are discovered allows us to avoid the problem where you need to have characters on overwatch to protect a character that is moving, in case they trigger an enemy reaction. In Spy DNA, if an enemy becomes visible, you can just react to it if you choose. We completely bypass the complexity of having the player figure out which rule they can use to protect them against the AIs use of reaction rules. Instead, you just react to what you see when it happens.

When out of combat, you move the party around in real-time. You can manually enter combat mode if you want, and the game will automatically switch to combat mode when the first shot is fired. Exiting combat mode is always manual, unless the mission is finished.

We have put a lot of thought into how to create as realistic a game as possible, where the world feels natural and real to the player. We want you to enjoy the gameplay and story rather than having to learn and optimize for an arbitrary rule system. For many situations in Spy DNA there isn’t just one “optimal” solution, but multiple ways to accomplish your mission, which frees you up to just play the way you want.
 

Procedurally generated missions in Spy DNA

By Alex Maier, Writer of Words

Here’s a basic overview of how we generate randomized missions. We’ve built a Mission Editor tool for that, and here’s how it looks when you open a mission in it. Here we set all the basics for a mission, such as terrain type, time of day, and so on.

Spy DNA mission editor "Map" tab screenshot

Then we add all the interesting stuff, like the NPCs you’ll encounter on a mission: enemies, neutrals, people to be rescued, that sort of thing. This is also where we add eligible infiltration options. Not every infil option makes sense for every mission, so we make a list of the ones that do for a given one, and also describe the outcomes.

Spy DNA mission editor "Gameplay" tab screenshot

When the mission is generated, only a subset of the infiltration options are picked.

Generally, you’ll see four kinds of infiltration outcomes, and each of them influences the mission at spawn:

Outcome

What it means for the mission

You did great and have ALL the intel

You’ll see mission markers for some of the objectives, such as hostage location and enemy camp HQ, or enemy patrols won’t be concealed by the fog of war.

You did okay, and have some intel

You’ll see a mission marker for the some objectives, but not for others. In the case of our hostage mission here, you’ll see where they hold the prisoner, but not where the enemy HQ is, or you’ll find out the enemy patrol route, but not the schedule.

You failed, and have no intel

This is the equivalent of going in without any infiltration. Nothing lost and nothing gained.

You failed, and now the enemy knows you’re there

You’ll be going in blind, and the enemy will be on high alert. They may have added more patrols, etc. Examples of such failures would be to have your recon drone shot down by enemy, or have your agent captured during infiltration.

In-game, you select the infiltration option during the mission brief meeting, and it’s simulated prior to mission start by using the stats of the character you chose to complete the infil. This will allow for different members of the squad to shine, and for the player it will make sense to pick the right person for the right task. Or not, and deal with the consequences.

Here’s how the infiltration planning meeting looks like in-game.

You pick which infiltration option you like best

We use Lua to script all the different things we’d like to randomize. For example, the mission description (see first and second screenshot) has all these variables, and below it there’s a box where we define them. The randomizing function pulls the values such as countries, diplomatic titles, and such from a table where we store all kinds of things, tagged with metadata for searching, and the player sees the mission description like this.

Pardon the layout - it's a dev build :)

Here’s how it looks in the tool.

Randomizing names is a bit trickier, because unlike the stuff that is only used in the description, the random name has to be assigned to the character when they are spawned on the mission map. We have a way of doing that when we add the character to the mission.

This is also where we pick the character template for a given NPC, which includes the types of things they wear (military uniform or civilian clothes etc.) and some other aspects of their appearance such as hair styles (again, military personnel will have simpler hair styles and natural colored hair, while the civilians may have wider choices of both).

This is the NPC we're going to need to rescue

In most cases, unless it’s an NPC that persists throughout the game, we fully randomize gender, skin color, and body type. Military personnel will again have fewer choices in the body type department, as we will only allow them to have an “average,” “fit,” or “fighter” fitness level. Civilians get a fourth option in fitness level: “unfit.”

The level of fitness and body type aren’t just for show either, they influence the body owner’s attributes as well, so if you meet someone who looks strong and fit, they very likely are.

To make sure that the spread of different body types is more realistic, we weight the probability of each of them occurring. After all, you don’t see twenty-five MMA-fighter-level-fit people for every hundred you meet.

Body types matrix for female and male bodies:

light

average

heavy

unfit

f-un-lt, m-un-lt

f-un-avg, m-un-avg

f-un-hvy, m-un-hvy

average

f-avg-lt, m-avg-lt

f-avg-avg, m-avg-avg

f-avg-hvy, m-avg-hvy

fit

f-fit-lt, m-fit-lt

f-fit-avg, m-fit-avg

f-fit-hvy, m-fit-hvy

fighter

f-ftr-lt, m-ftr-lt

f-ftr-avg, m-ftr-avg

f-ftr-hvy, m-ftr-hvy

With that, we can populate the world with a fairly diverse set of characters for the player to encounter. And often, shoot. Oh, and also create for yourself at the beginning of the game.

Other things you will have noticed in the mission generation tool would be buildings. We generate buildings at runtime from a floor plan which we also create in our tool, but that is a topic for another post.

For now, suffice it to say that when the map is generated, the buildings are placed on it somewhat randomly, according to the parameters specified when the building is added to the mission.

Let’s not forget the objectives! They contain Lua commands to evaluate when the conditions for a particular objective have been met, or failed, such as in case of having the civilian you’re supposed to protect, die. If an objective is marked as required, failing it will mean mission failure and you’ll have to do it over, and if an objective doesn’t have this box checked, you can fail it all you want and still complete the overall mission.

The Lua check is to make sure that the NPC 39 (our Hostage) is alive. Because this is a required objective, the mission is failed the moment the NPC dies.

Some objectives are only available when particular conditions are met. Case in point: “recover drone wreckage” is only shown if you chose the drone reconnaissance option and the drone crashed. If the drone is shot down and captured by the enemy, your objective (and area of search) will change to retrieving the drone from the camp.

When everything is said and done, we’ll have a mission that can be replayed over and over, but it will never be exactly the same. You’ll get different infiltration options, the terrain will be different, and the buildings will never be in the same spot. Same goes for objectives such as which building the hostage is in, or where the drone wreckage is.

By the time we ship the Early Access version, we’ll have a number of such missions implemented, in addition to a handful of storyline ones to tide y’all over until the full version is released.

We’re also thinking of creating affordances for players to design their own mission mods, and whole missions down the road. That’s something that will have to wait until after Early Access though.