realism

Combat in Spy DNA

This is Jason with an update on the Spy DNA combat system.  We’ve been making some graphics and demo videos for our Kickstarter pitch, and I thought we should share some of them with you. In today’s post, I’ll start with our new gunsight, that we use for aiming, and then move on to the combat system.

In Spy DNA we have put a lot of thought into making combat feel as real as we can.  One of the areas that’s often disappointing in games is the critically important mechanism you use to attack the enemy. 

Most games assign a character a simple chance to hit, usually modified by range and cover.  We use a full 3D world instead.  To avoid the problems, such as identifying obstacles and cover, when aiming in the  top-down view, we open a gunsight view when you pick a target.  

Single shot firing sequence

The biggest thing we do differently is replace the “chance to hit” with “Circular error probable”.  The rings around your aim point represent the 50%, 90%, and 99% likelihood of your shot landing within those rings. 

You trade off time aiming for more accuracy in your shot.  You can adjust it to try to get the first shot off quickly, or take some time to make sure you hit. You can also adjust the number of shots, burst, or burst length.  

When using automatic fire, burst or full auto, recoil will reduce precision of later shots as recoil adds up.  For single shot and burst your character will re-aim so follow on shots meet the same accuracy requirement you set.

Our damage model is based on your weapon and where you hit the target, not on a random dice roll.  So you will be able to aim for weak spots in the armor or for vital parts of your target.  Cover is handled the same way.  The ability to move the target point around lets you aim for exposed parts of the target. 

Now let’s talk about how our combat system works. We call our system Concurrent Turn-Based.  I’ll explain what this means.  We differ from traditional turn-based games  in some important ways.  

Let me start with what we are trying to accomplish. 

  1. The player should have time to think and take in the battlefield and environment.  
  2. The moves available to the player should as close as possible mirror the options that  a real-life soldier would have.
  3. The results of actions should be be realistic.

After a lot of experimenting we have settled on a system where the game focuses on a character when it is their turn to start their next action.  So while combat is ongoing, the game engine cycles though characters as their turns come up.  In this way it feels like a traditional turn-based game.  There is one very important difference.  While the game is progressing to the next player turn, every character and object in the game moves.  

This was not a decision we took lightly.  We made this decision to avoid the time quantization problem that traditional turn-based games have.  Think of the frustration where near the end of the player turn you move a character and trip one or more enemies.  Now your character (or whole party) just sits there helpless while the enemy takes a turn (or full round) worth of actions.  This is a side effect of games trying to map combat to a mechanism that doesn’t exist on a battlefield.  

In Spy DNA we are trying a more direct simulation of the world.  The character that makes contact would actually have the initiative.  The characters that spots them would make a reaction time roll (based on their attributes and combat experience) to see how fast they can react.  Also because other characters in the player party may be mid-action, such as movement, you could cancel those long actions and give them a new task.

I made a short video where a character ambushes two unaware NPCs.  The action commands I give the game are:

  • Throw a grenade
  • Draw my pistol
  • Crouch
  • Aim and shoot to finish off the second target

About three seconds of game time actually elapses in this demo.

Compared to Turn Based games, we have two major differences.  The first is turns in Spy DNA are not uniform in size.  Turns come up as the character completes their previous command.  This means that fast actions such as firing a single shot will result in that character's turn coming up again quickly.  Slow actions such as moving a long distance will mean many other characters are likely to take their turns before coming back to that character. 

The second major difference is the turns progress concurrently, i.e. all at the same time.  So if you give a move order to one character, and a quick attack order to another,  each time the second character attacks you will see the first make some progress on their move order.  In effect, you will see time progress forward for everyone until one of your characters completes all the commands in their queue.

Should a character spot something needing your attention while they completing an command, the game will stop and focus on the character.  This allows you to react to things that come up mid action such as an enemy coming around a corner.  

I hope this gives everyone a feel for the type of gameplay we are trying to deliver.  

 

 

Movement and encumbrance

Everyone who has played the typical RPG is familiar with the way most games model encumbrance: Your character has a “carry weight.” Add anything to your backpack, from nothing at all, and up to that magical "carry weight," and your character moves exactly the same way. Go over the limit by even one bit, and in some games you lose the ability to run, or sometimes you can no longer move at all.

We think there's a better way to model this.

What if instead of using the player stats to compute a weight limit, we just compute the walking and running speed for any given weight? Computers are good at math, so this is not a burden to them as it would be to human players playing a pen-and-paper game.

Here’s a rough graph of the results:

Making the speed vs weight tradeoff continuous has a big effect on gameplay. In most games the strategy is to just pick up everything in sight until you are encumbered, then go through your inventory and throw away what you don’t want to keep. With a continuous system now the player will have to decide for every item, if it’s worth its weight.

Encumbrance affects things beyond running speed. Walking can also be slowed and the rate a character loses stamina might change. In addition some actions can be impacted. Some examples:

  • You are trying to pick a lock. Encumbrance will have a minimal effect as a character is not really moving much.
  • You are trying to swim across a stream. It may seem pretty obvious that this is not the best time to be wearing heavy armor or carrying your gold ingot loot.
  • Bicycle riding. Some small effect, but like lock picking, the effect will be minimal

Each in-game skill will know how to adjust for any given encumbrance, making for a richer and more realistic player experience.

Here's a case in point: Mythbusters testing encumbrance in a real-world Doom setup. It will go no different for the characters in our game: the fitter and stronger they are, the more they can carry without a noticeable encumbrance.

Can you really carry all the gear of a first-person shooter and remain operational? UFC's Brendan Schaub helps Jamie and Adam find out.

Realistic damage models

target.png

This is part two of the Weapons series. Read Part One: Realistic weapon behaviors.

Warning: This article will be discussing damage to the characters and contain detailed  descriptions of wounds and their effects.

If you played any recent games that involve combat, you’d have noticed that they all use “hit points” to model damage. They may sometimes be called “health,” “vitality,” or “physical condition,” but the underlying logic is the same: You get a number representing how close a character is to death. As a character gets attacked, any damage they sustain gets subtracted from the available hit points, and once you reach zero, you die. Simple, and elegant, right?

Well, simple it may be, but this model is also completely unrealistic. It forces many weapons to be less useful than they should be; it takes away from the challenge of the game; and finally, it turns combat into a war of attrition where the player and enemy take turns shooting each other until everyone on one side is dead. All of these things are undesirable in a realistic game.

Life is full of complex balances and trade-offs, and a realistic game will seek to replicate that as closely as possible. So what is this going to look like when it comes to damage?

Realism

In most games, getting shot in the leg is a good thing. You take minimal damage and otherwise proceed unhindered. That would not work quite like that in real life.

No human has a hit point rating. When people get hurt in combat, they can’t just go on as if nothing happened until all their life points are gone. In a realistic setting, even if all you got was a flesh wound, you’d start to limp at a minimum, but if the bullet hit a bone, you may not be able to walk or even stand anymore.

To model this correctly in the game, our weapons won’t have any damage ratings. Instead they’ll be rated for the type of projectile they fire, and the energy with which the projectile leaves the barrel. From this we can calculate how much energy the projectile loses from air resistance on its way to the target.

If the target has armor, it will slow or stop the projectile. If the projectile is stopped, there may be no damage at all or some blunt damage depending on the armor type and energy involved. If the projectile did penetrate the armor, things will get bad for the target.

In the previous post we talked about accuracy and how hits are determined. So at this point we know: 

  1. where the target has been hit,

  2. with what kind of projectile,

  3. and with how much energy (how fast) the projectile hit.

From all this data we can generate a realistic wound by looking at the body part that’s been hit. The system looks at what organs or structures there are, and calculates how much damage has been caused based on the velocity of the projectile and its shape. It’s possible that the bullet will pass through-and-through, as is common with small-caliber armor piercing rounds. In that case it may hit additional objects.

So now we have calculated one or more wounds, e.g. a broken leg, or a damaged eye, a direct hit to the heart, or an arm flesh wound. Just reading this list, you can probably imagine how each of these would limit a character. Some injuries may have more complex outcomes, when they don’t drop the target outright, but limit the character's ability over time.

Depending on the severity of the wound, there will be periodic heal/die checks. Some wounds will be life-threatening, in which case we’ll calculate a survival chance, and check frequency rate. Passing the heal check doesn’t mean the wound is healed, only that it’s no longer life threatening and the character will survive. Medical aid will change the odds for each wound, improving the chance of survival. Medical aid can also reduce the frequency of survival checks, so in some cases it buys the time to get the character to a proper hospital.

Now that may sound scary, but it should make for a more nuanced and interesting gameplay. You’ll have more options for selecting the right kind of weapons for all members of your party, depending on both their talents and the objective.

Take for example the small concealed pistol. There’s a reason they exist in real life, but in your typical game they are pretty much useless. With this system, they can be useful once more, provided you can avoid the armored parts of your target and hit a sensitive spot.

Same goes for armor and combat tactics. Do you bring heavy armor to the fight hoping to stop any rounds headed your way, or do you rather focus on not getting hit at all? Heavy armor will make you slower and more conspicuous, while light armor or none at all may increase your agility, but makes the consequences of getting shot much more serious.

As a result of balancing the objectives with risks, as the game goes on, every player will end up building a very unique party, best suited to their playing style.

That’s it for today. Our next post will deal with encumbrance and movement.

 

Realistic Weapon Behaviors

Here at Shy Snake, we have a focus on realism. Let us explain how that carries over to weapon design and balance.

The nuts and bolts

We start with the real properties of a weapon, the real basics such as how many rounds it holds. We don’t use “proxy” statistics such as bursts or taps. No weird logic that leaves you with a pistol holding 4 rounds while somehow being as accurate as a sniper rifle.

This means the weapons will have the same realistic controls you would expect in real life. Most will have a single-shot mode. Quite a few have a burst mode, or full-auto mode. You may remember our earlier post, in which we talked about timelines. In a timeline-based model, if a weapon has full-auto mode, it’s 100% up to you how long you want to hold that trigger: fire a short burst or rock’n’roll until you’re empty -- completely up to you.

Accuracy and chance to hit

Here we make a pretty dramatic break with most squad-based strategy games. Rather than using a basic “hit chance” with modifiers for range and possibly cover, we go in a different direction. Our system is based on CEP (Circular error probable).

While it may seem like a lot of fairly abstract math, in practice this concept is very simple to explain.

It goes like this: The player specifies an aim point for a character. The system then calculates based on skill, time spent aiming, situation, and weapon, where the shot actually goes. From there it determines hit or miss.

This also means things such as hit location fall out of the calculation naturally. A skilled shooter with a good rifle and time to aim should consistently miss by just a couple inches at most at normal ranges. That’s probably going to be both a hit AND hit something important. A less-skilled shooter panic firing a pistol is much less likely to hit what they aimed at, and may well be a hazard to those around them.

There are three primary factors that will determine where the shot actually goes.

  1. How well did the shooter do at pointing the weapon in the right direction? Based on their skill, the time they spent aiming, and conditions such as standing, kneeling, or prone.

  2. How accurate is the weapon? Does it put the round right where it’s aimed or does it vary widely on it’s own?

  3. How stable is the round once fired? Does it veer wildly off the intended trajectory?

At typical combat ranges the first is the dominant factor. It’s also where a lot of the gameplay balance for the various weapons happens. The powerful heavy weapons tend to be slow to aim and vice versa.

There's a reason the military carries assault rifles

There's a reason the military carries assault rifles

So just as in the real world, you wouldn’t want to use a sniper rifle to breach a room, just as little as you’d want to use a pistol for picking off an unaware target at long range. These curves are actually generated from the length, weight, and grip of the weapon, and are unique for each.

The player will have a wide range of options for servicing the enemy.

Recoil and burst or full auto fire

Once the player has aimed and begins to fire, the accuracy model continues to be important.

One thing almost all games get wrong, is that burst fire doesn’t affect the chance of the first and consecutive rounds fired hitting their target. In our system, once the first round is headed downrange, the recoil of the weapon is calculated against the shooters stance and ability. This degrades the aim of the weapon.

As a result the next shot will be less accurate; and each subsequent shot will be even less so, until you reach the point where the character’s ability to control the weapon will stabilize any further loss of accuracy. This means that low-recoil weapons are more desirable if you plan to throw lots of rounds downrange in a hurry.

For a look at how our game deals with damage and damage modeling, stay tuned. That’s a subject for another post.