informa
6 MIN READ
Featured Blog

Bullets: Can't dodge instant and why that is a (solvable) problem

Games are about reaction as much as action, but for guns in games reaction is much more difficult to enable because you can't react to the instantaneous speeds with which bullets fly. How do we deal with that?

You don't dodge bullets. You can hide behind things, crouch, or leap around like an idiot to make shots harder for the opponent to line up and time, but once they pull the trigger you can't get out of the way. In fact most games don't bother to do all the physics on how much a bullet drops or calculate how long it would take to reach where it eventually hits and just treat a bullet as if it travels instantly towards its destination.

image

There are exceptions such as ARMA and Battlefield games, but choosing to not do this is typically fine because you aren't aiming and firing over distances that would noticeably effect bullets (such as a from one end of a room to another) and so not doing this is not so much a failure as it is a smart optimization.

You don't dodge bullets but you can effect your chances of getting hit by bullets by playing smart and not standing around motionless in an open field. But even if you are playing optimally (hiding behind cover when you can, moving evasively when exposed...) these only lower your chances of taking damage they don't mean you won't take damage. If you are playing a game like Shovel Knight and take damage it is because you screwed up, enemies telegraph their attacks and you should be able to dodge them. In shooters though there is always the chance of getting hit even when you are doing everything right, which creates a problem.

Basically damage is a game punishing you for doing something wrong, and your health is how many mistakes the game will let you make before penalizing you. The problem in shooters is that you will take damage regardless of how much you deserve it because deserve has nothing to do with it, probability does. This puts players are in the unfortunate situation where the game may be penalizing players when they didn't deserve it (by which I mean they are playing well).

It is kinda a background radiation of damage, players are constantly taking a bit of damage here and there and you can't really fault them for taking those hits in the same way you would in Shovel Knight because they aren't screwing up like they would be in Shovel Knight, they just aren't able to dodge bullets.

How do games deal with this problem? Well, there are two basic models we can look at to understand how games deal with problem: Halo and Quake.

Halo gives you a rechargeable shield, if you go a few seconds without getting shot then it starts to recharge and you are back to full health in a moment.

image

Time out guys, that one hurt. I said TIME OUT!

Shovel Knight gives you a big old pool of health at the start of a level and says you can't make more than 10 mistakes (a mistake would be an instance where you take damage) in this level, but you can have those 10 mistakes all happen in a 3 second period given you then proceed to play the level perfectly. Halo's shield model says you can't make more than 3 consecutive mistakes, you can make potentially infinite amount of mistakes so long as you pace yourself but you can't play worse than X at any given point in time in order to get through the level/round/whatever.

The advantage of the rechargeable shield is that it completely suppresses the problem of getting hit by those stray bullets you catch every so often in shooters. A single lucky shot from a machine gun at 400 yards that actually beats the odds and hits you won't matter because damage only matters if it is a lot and in a relatively short amount of time. The downside of this system is that it very easily invalidates a lot of damage the players do to each other which can be frustrating.

image

Did you almost kill someone? Well it has been 5 seconds since you shot them so they are at full health again.

This makes it impossible to defeat someone with a hit and run/bleed them out slowly kind of fighting style. The only thing you can do it always go all in on someone when you see them. Moments when you are low and running for your life are going to last seconds at best because that is how long it takes to get back to full health.

Halo though combines having an energy shield and a pool of health, so that you can deal less than lethal damage that will stick around on the player, you just have to exceed a certain damage threshold to be able to do that. Call of Duty games however just have the regenerating shield part (though it isn't called a shield).

Games like Quake and Half Life don't give you a fancy regenerating shield though, they choose to deal with the game's background damage radiation by doing things like putting small health pickups all over the place. If you take a bit of damage then just pick up one of the many health drops and be on your way, it gives you an easy and readily available way of undoing damage that has been done to you.

image

One problem with this model is how weird it is that there are so many super effective healing items there are in the world, it feels very gamic (here are heals) and the shield at least feels internally consistent (when they frame it as a shield at least).

The clever thing about this system though is that regaining health is tied to movement, you have to run around to get the health pick ups while a regenerating shield system tends to encourage people to hide in a hole for a couple seconds. Regenerating shields encourage people to stop taking risks, but when you have to get to a health pickup then the amount of risks you have to take increases because you are likely going to have to expose yourself in order to get to that health.

It is important to understand who has to take risks in these two different health models. In the shield model the player who did a good bit of damage on an enemy has the onus put on them to take a risk and expose themselves in order to secure the kill they started (the attacker is called to action before the other player's health has time to recharge), whereas in the health pickup model the player who has taken damage must take risk in order to try and get to a health pickup (the person who takes damage has the call to action).

Health mechanics are incredibly important for how a game feels and yet it is often invisible, it doesn't have the same feel of a gun sounding good or a character moving smoothly. It is necessary to understand what your mechanics are encouraging players to do so yuo can make sure that lines up with both how you want your players to act and how the characters  they are playing as would act.

Latest Jobs

Xbox Game Studios

Redmond, Washington
10.5.22
Technical Lighting Artist

Innogames

Hamburg, Germany
10.5.22
Game Designer - Elvenar

Bandai Namco Mobile

Barcelona, Spain
10.5.22
Principal 3D Animator

Cryptic Studios

Los Gatos, California
10.5.22
Staff Core Software Engineer
More Jobs   

CONNECT WITH US

Explore the
Subscribe to
Follow us

Game Developer Job Board

Game Developer Newsletter

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more