development

Spotting and senses

by Jason Sams, Lead Developer

Let’s talk about spotting and senses in Spy DNA.

In any game where stealth is a factor, you also need to consider detection. We just finished some improvements for a mission. I don’t want to spoil the mission, but I can talk about the improvements to the spotting system.

In Spy DNA we have three senses, visual, sound, and smell. Each of these has their own set of rules. A character has attributes for each, so it’s possible for them to be very good at one, while poor at others. We also have a skill for observation, I’ll go over how they work together in a bit.

Let’s start with vision because you will need a visual detection of a target before you can evaluate or attack it. Vision controls whether we render an NPC, so if no member of your party has visual contact with an NPC, you will not see it in game.

Here is a list of some of the things that factor into visual detection of an NPC.

  • Distance to the target: farther things are harder to spot.

  • Senses: eye attribute of the spotting character.

  • Lighting conditions: bright light will make something easier to spot, darkness makes it harder.

  • Movement of the target: moving objects are easier to spot. We also factor in movement speed.

  • Movement of the spotter: if the spotting character is moving it will make spotting things more difficult. We use a different curve here vs the target speed because movement affects both differently.

  • The clothing of the target being spotted: camouflage makes one harder to spot. Ex wired.com/2014/03/hidden-snipers

  • Genetic enhancements of the spotter will make detection easier. The “Eye Resolution” enhancement will make it easier to spot objects at longer ranges, while the IR enhancement will reduce the effectiveness of darkness, camo, or the stealth skill.

  • Stealth: knowing how to blend in with the environment is a skill

  • Observation skill

You might ask what the difference is between a characters eyesight attribute and their observation skill.

When we calculate the chance to spot, we do two separate calculations. First we calculate the strength of the signal. That is the physical question of can the character actually see target. This is basically an eye-chart test. Then we factor in the difficulty due to the environment such as lighting, movement, stealth skill, and we combine this with the spotters skill. So we have two numbers, can the character see the target, and how hard is it to pick it out of the noise. We combine those into one number representing the percentage chance to detect the character and run the check.

I should also note that spotting is continuous. Failing the first check does not mean you will never spot something. Your character will continue to try to spot a target as long as they remain in their field of view.

We treat sound in a similar way to vision. There are a few important distinctions. Detecting a sound will not tell you where the source of that sound was, only the direction it came from. We also have different enhancements to improve a character’s hearing. Sounds will also tend to be impulses. Meaning the detection isn’t continuous but done each time the target makes a sound (footstep, uses an object, fires a weapon, etc.).

Smell is different than the other two. In general it won’t be used to detect an NPC, but rather environmental hazards. Another difference is, it will need time to propagate. So if a bad guy cuts the gas line, it will need some time before it’s detectable at a distance.

We are proud of the results of our detection systems. While not every single one of the genetic modifications and senses will be fully implemented in the Early Access, you should get a pretty good idea of how detailed and realistic our simulation is.

Run! It's the cops!

Stealth missions usually revolve around you not being noticed or identified as trespasser by the civilian NPCs around you, but what happens if they do?

He’s ready.

He’s ready.

A regular civilian NPC such as a researcher, office worker, or even a building night guard would pose absolutely no challenge to a Spy DNA agent, which would make missions boring. To help up the ante a bit, we’ve added the police.

The “police” NPCs will have a non-zero “combat tactics” skill, and depending on their experience level they’ll have other relevant skills, such as Pistols or Observation, to name a couple. This will make them more formidable opponents than your typical night guard. They will also arrive at the scene expecting trouble and will definitely carry weapons.

“You’re under arrest!”

“You’re under arrest!”

When civilian NPCs see something that we’ve defined as crime (picking a lock, using specific items, being in restricted areas, etc.) or if they see something that would hint at criminal activity (an unconscious body for example), they won’t go after the perpetrators or investigate the crime themselves, they’ll call the cops instead.

When the NPC “calls the cops” we start a countdown until the police units are spawned on the map. How soon they arrive depends on how remote an area is, among other things.

We’re playing super-spies, so when the Police Dispatcher activates the response units, your character will pick that up on their police scanner. The dispatcher will state how far out the response units are at regular intervals, to give you an idea of how urgently you need to get your character out of the area.

On stealth missions, getting arrested by the police will result in mission failure, as will shooting any civilians, so our heroes should ideally clear out before the law enforcement officers show up.

Combat hesitations

by Jason Sams, Lead Developer

In Spy DNA we have talked about how you can queue actions for your characters. When we were discussing the difference in behaviors of well trained troops or agents, vs thugs, vs civilians, one of the things that came up is how quickly a character can evaluate the situation and choose their action.

One of the concepts we have introduced to represent this in-game is the idea of a character being indecisive. To model this we introduced a skill called “Combat Tactics”. It’s a passive skill.

We used to key a character’s combat response off of their highest combat skill, but after thinking this through, we concluded this was not an accurate portrayal of how people respond in a tactical situation.

Let’s say we’ve got someone who’s a very skilled marksman while shooting at the range, but has no actual combat experience. Such a person would do worse in combat than a basic soldier who may have a significantly worse shooting skill, but has been trained specifically for a combat situation.

The new “Combat Tactics” skill will use mental quickness as its primary attribute, and mental memory as its secondary attribute. When an NPC decides to change their course of action in response to something it sees, this skill will be used to generate hesitation before starting the next action. This means some civilians and green troops may freeze for a bit once things go loud.

So how does this impact PCs?

When a PC is carrying out their queued actions this will not affect them at all. However, should you cancel your action queue, we will generate a hesitation for the character to represent this changing of their mind. Some PCs will be able to do this almost for free, either due to extreme mental quickness (Margo), or lots of training (Ivan). On the other end of the spectrum, avoid changing things up on Karsten, who’ll need some time to figure out the next steps. In effect it will be important for some characters to stick to the plan, whatever plan you made.

The “Combat Tactics” skill will improve with use, but the governing attributes will still have a large impact on how fast a character can respond to the change of orders.

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 2016

Spy DNA screenshot, August 2018

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

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

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 2016

Character creation, August 2018

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

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.

arps-objective-window.PNG

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.

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.

Capture9.PNG

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

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

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

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).

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

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

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

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 :)

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

Here’s how it looks in the tool.

arps-editor-names.PNG

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

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.

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.