game design

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.
 

Managing complexity in games

A little while ago, I gave this 5-minute talk about managing complexity in games such as Spy DNA.

The main point of the talk is, that as the computer technology advanced, game mechanics of strategy RPGs and tactical games have not kept pace.

Driving and flight sims do a great job of simulating real-world conditions while keeping the game experience accessible and fun. At the same time, RPGs and even first-person shooters still rely heavily on artificial constructs and arcane rules of combat created in the era of pen-and-paper games.

With Spy DNA, we endeavour to bring this sort of detailed realism to the RPG world: simulating combat on a very detailed and granular level, all the while preserving the approachability and the fun of playing a game.

The slides are embedded below. Post your questions in the comments!

Realistic weapons in Spy DNA: How deep does this rabbit hole go?

As we’ve been known to say on more than one occasion, we want Spy DNA combat to feel very realistic, and by extension this means that the weapons also need to work like you’d expect them to in real life.

On one hand, weapons need to work realistically, in the sense that they should have a range and damage specifications similar to the ones in real life. Sniper rifles are best used at ranges over 100 meters (and we’ll make sure there are maps big enough for that to matter), and handguns are a good choice for concealed weapons or closed-quarters combat, where you’d have difficulty wielding a long-barreled assault rifle.

If you’ve been following us for a while, you know that that’s a given, and a premise of our whole game, really. When we set out to build Spy DNA, we wanted to provide the player with as realistic a combat simulation as possible, while still making it a game.

The main implication is that the realism makes for a slightly different set of perks and challenges than a typical shooter. We want for the player to be able to use the common sense and knowledge of how things work in the real world to navigate the game. Basically, if you think doing something would get you (or the opponent) hurt or killed in the real world, it should be the same in Spy DNA. Case in point, head shots. Best to avoid them. Or land them on your enemies.

Just like the real deal (P25 dart pistol)

But on top of that, the weapons also need to look the part. If we gave our soldiers guns that look like they’d be hard to get through an ordinary doorway, or were too heavy to even lift, the realism and the immersion go out the window. Don’t get me wrong folks, there ain’t a thing in the world wrong with games that do that, but it’s just not where we chose to take Spy DNA.

The little screen on the back shows ammo levels and other useful info to the shooter

So while designing the weapons, working together, Jason, Denis and I have been periodically taking a step back to check whether the weapon still looks usable, practical, and like something that you could imagine the military of 2075 using. You could overhear us having conversations about making sure that we don’t eject brass into the user’s face or hands, or make the shiny trim reveal the position of our sniper.

We put a lot of thought into the ammo feed position, grips, and how easy would it be to reload or unjam in a firefight, what accessories the owner may want to add and where, and so on. Denis put immense attention to detail into each weapon, and as a result we have game guns in which the sights align when you’re looking at them like you’d be aiming. The fact that it’s a 3rd person game where the player will most likely never see these little details doesn’t mean that we don’t pay attention to them.

Most weapons in our game will have a range of accessories/extensions such as scopes, sights, grips, bipods, and extended ammo clips that the player can choose to equip to add a touch of personalization to their kit.
If our Early Access really takes off, we should have the funds to make more customizable parts for the guns, including rare mods, color schemes, and accessories that can only be gained by completing certain missions.

Stay tuned for the announcement of our Greenlight campaign!

Putting the RP in RPG

Those of you following our updates closely may have wondered just how much story and actual role-playing will we have in Spy DNA. Well, wonder no more.

We just purchased a dialog/script tool that will allow us to both visualize the existing dialog branches and stories, and to integrate them with the game. The tool is called Articy:draft, and so far, we’ve been quite impressed with what it can do.

Aside from offering a handy way to keep track of all the characters, locations, and dialog lines, the tool integrates with our existing source control (big plus!) and with Unreal Engine. Once we’ve got that configured, we’ll be able to assign dialog directly to the characters, wherever they pop up in the game.

As is the Shy Snake tradition, we’re already planning some custom work in order to have the dialog have effect on NPC disposition and story line, and vice versa, have character skills and attributes as well as prior actions result in more (or fewer) dialog options when talking to NPCs.

Right now, I’m busy migrating the existing script from the ODS file into the Articy tool, and what I’m discovering is that the visualization makes it very clear where more dialog options can be added. Conversations without any branches or with only very few ones become immediately apparent once you lay them out like a flow chart.

So once all the dialog is in, I’ll be taking a second pass over it, adding more branches and optional outcomes, to make the role-playing aspect of the game match the combat in complexity and richness. How will I do it?

NPC disposition
Depending on where your behavior falls on the scary to nice spectrum, the NPCs you’re interacting with will like you more or less. The more they like you, the more information they will share, and the more readily will they comply with your requests. Not to say that you always have to be Miss Manners, because some NPCs may need scaring before they become cooperative, such as the baddies you take prisoner.

Skills and attributes
When you are talking with NPCs, you’ll find that your attributes and skills influence your dialog options as well as how convincing your character will be saying those lines. Going with your character’s strengths will mean having more successful conversations.

Going against your character’s “nature” may result in humorously bad outcomes. Not every character will be a natural at diplomacy and negotiation, so you can imagine that some conversations may not go as planned.

History
Things that your character already knows or places they’ve been will influence what dialog options they’ll have when talking to NPCs. Same goes for previous actions and acquired items.

All in all, my goal is to write enough dialog branches that you will not be able to explore them all in one play-through. You’ll have to create different characters and play a couple times to discover all the dialog options.

What do you like (or dislike) about dialog and story in games? When you play, do you try to exhaust every dialog branch or do you just click through the bare minimum so you can get back to fighting? Tell us below in the comments!

Kickstarter update 2: Combat visualization

Folks, we're currently on Kickstarter, and sharing a lot of our updates there. We'll be also sharing the updates here for your convenience. If you haven't yet, help us by making a pledge, sharing our project on social media, or be daring and do both!

It’s been a busy week as we get ready for a live demo at Homebrew Arcade.

We’re focusing on improving the visualization of combat. Now it’s easier to see where the shots are going with trails on the 3D map. We also implemented cover and missed shot handling so it’s been a productive week. Missed shots means if you miss the intended target, we still track the shot in case you hit something else interesting. 

This also reminds me to briefly mention how cover works. We showed in the video how when a target is obscured it is grayed out to make clear what’s in and out of your line of sight. If you fire, and hit the cover, it’s actually treated as armor. So you really want to hide behind something solid. A concrete wall is good cover, a cardboard box, not so much. 

Here is a short video clip showing “missed” shots being used to effect. I forgot to remove the debug logging where I was fixing some hit location code this week so ignore the text on the left.

Next week will be focused on AI.

Characters and animation

We’re getting ready to go to Kickstarter with our game, to help us raise the money needed for the custom art, animations, and hopefully original music for Spy DNA. This means we’re making a new video to show off the progress we’ve made in the past couple of months.

One important improvement you’ll notice is that we’re using custom characters to replace the placeholders we got from the Unreal Engine asset store.

The cool thing about using custom characters is that we can make them look all different, use different body types, skin and hair colors, and of course different clothing.

Now the challenge with that is that once you stray from the Unreal Store, you need to rig up and animate the characters from scratch.

While we’re working on funding custom motion captures, we’re using some animations we purchased from mo-cap vendors with our characters.
We have (finally!) settled on an animation workflow for the project. We use Autodesk MotionBuilder for working with animations. This allows us to retarget an animation from one character to another. This is important because depending on the source of the character they may have a different skeleton, which makes the animations incompatible. This tool allows us to solve this problem.

Next, we get the animations into our project in Unreal Engine. That done, there is still a lot of work to do. The first step is selecting which animation to play for a character at any given time. At last count we have nearly 1,000 animations captured. Selecting the right one to play at any given time is complex enough we had to abandon the normal UE4 blueprint system and move most of the animation logic to C++. Once the system knows which animation is to be played, it may be necessary to slightly speed up or slow down the playback to match the speed of the specific character. 

It’s at this point that things start to get hard (as if it wasn’t hard enough already, heheh). So now that you have your base animation, you want to adjust it for the environment, so that a character's feet don’t go through the ground or hang in the air. Also you want the character to look and aim in the right direction. For these effects we are evaluating some middleware solutions (HumanIK, Morpheme, and IKinema). These provide tools for improving the interaction between the animation, character model, and the environment. In some cases they can also generate animations on the fly in response to environmental stimulus. A good example would be falling down stairs after dying.

In the process of getting it all to work, we get to watch many animations that look pretty funny. Do you have your favorite animation bloopers from a game you played? Share it with us in the comments.

GDC session highlight: Making a game fun for all kinds of players

There were so many awesome sessions going on at the GDC, it was hard to choose which ones to go to! Luckily, attendees get access to the recordings after the event, so we’re looking forward to watching the sessions we didn’t attend in person.

When beginning to write this post, I noticed that GDC team have made some of this year’s sessions available to watch for free on YouTube already. As they continue to add to the playlist, I will post the more relevant talks here with my comments.

Just how hard would you like your game to be?

Just how hard would you like your game to be?

One of the sessions GDC already published makes great points about building games that can be fun to play for a wide range of users. We wanted to link this video here for you and share our thoughts on how this relates to what we’re doing here with Spy DNA.

The two main takeaways from this talk for me are:

  • Ability to remap controls is not just nice; for some users, it’s critical to be able to play at all.

    Spy DNA is primarily targeting the PC market, and we’re planning to allow the player to use either mouse and keyboard, or the game controller to play. To make our game playable for people who can’t use the standard key mappings, we will include the ability for the users to remap their controls to suit their needs.
  • From “almost impossible to lose” to “almost impossible to win” is a sliding scale of difficulty, and many players would enjoy choices beyond just “easy” and “hard.”

    We are giving this one a lot of thought.  We want to avoid the temptation to take the easy way out and just make a the enemies stronger or more numerous.  Instead we are putting our effort into the most realistic version of the game.  This will be the hardest setting.  For players that do not enjoy the harshness of realistic combat, we will have a variety of options to make the game easier.  Examples would be accelerated healing for the PCs, starting with more skill points, or a reduction in the enemy's ability to land the most damaging shots. 

    We understand we are building a hard-core combat system that will be more challenging than most strategy games. However, once someone buys our game, it’s theirs to play, the way they want to.  So if limiting the enemy to low-power weapons is something you want to do, that will be your option.   

    This means that in Spy DNA, on one end of the continuum, there will be a full “ironman” mode, where you don’t get to reload, and only very few (if any) checkpoints. On the other end, there will be a super-easy mode, for people who either don’t have the ability to master the harder difficulty levels, or don’t play the game for the challenge.

    We don’t want to limit the difficulty settings to just Hard, Medium, and Easy. Instead, we’re aiming to offer our players many more points on the continuum to choose from, both to make Spy DNA appealing to players of all levels, and to provide a gradual difficulty increase for better replay value.

Anyways, that’s what we thought when we listened to this talk. Even if you don’t watch the whole video (or any of it), I hope we got the two main takeaways across. Use the comments below share your opinions.