Page 1 of 1

FPS Players: How should recoil be done?

Posted: Tue Aug 02, 2011 6:33 am
by Dakatsu
(For those with firearm's experience, I'd also love your input.)

I'm designing a first-person shooter game, and obviously with a FPS game comes guns. I'm designing the game under the mantra of a "realistic FPS in space," and naturally this would mean that the weapons would recoil (moreso on planets with low gravity).

The question is, how should I go about doing the recoil? In real life, a gun recoils backwards, but obviously if I made the gun just go backwards that would not add any inaccuracy at all. In most FPS games, one of two things happen:

1. The gun recoils up, and possibly to the left or right a bit. The downside to this is that if you hold the trigger down on a high-recoil gun, you'd just be spraying straight up, and I really don't want that to happen, especially with the low-gravity planets, as a coil rifle on Callisto would probably be pointing straight up in two shots.

2. The gun recoils and fires in a "cone," basically as if it recoiled randomly in any direction (except backwards). The downside is that I am not sure if this is realistic. I've fired only one real gun in my life, so my experience is limited in regards to reality, but I can't ever say I've seen a gun recoil "down."

The goal is that I want it to look and act realistic; while I want to have the player be inaccurate if they hold down the trigger of an automatic weapon, I don't want to have the muzzle always pointed up in the sky.

My idea would be to have the gun recoil like in the second example, but have a "camera recoil" that slightly moves the player's view up. Currently, I basically have the first option, where the gun ends up being perpendicular to your view and you have to look at the floor to fire straight forward.

Any input/ideas?

Re: FPS Players: How should recoil be done?

Posted: Tue Aug 02, 2011 6:45 am
by woodchip
Might want to look at this link:

"Unlike any other firearm ever invented, instead of having all the recoil force slam back into the shooter’s shoulder, causing massive amounts of felt recoil and resultant muzzle climb, the KRISS System absorbs and redirects these forces downward and away from the operator thus enabling him to better control and keep the KRISS firearm on-target."

http://www.kriss-tdi.com/products/kriss ... 5-acp.html

Re: FPS Players: How should recoil be done?

Posted: Tue Aug 02, 2011 6:50 am
by Thenior
Rifles tend to recoil backward, Pistols tend to recoil up, simply because of the way you hold them/their size.

But realistically, if I am aiming with either a Rifle or Pistol, the recoil is mostly going to push me up. I have to retarget everytime.

Usually games have a "blind fire" or "shoot from the hip" mode, and a aiming mode. Most games, when you aim, recoil up a bit - and that seems as realistic to me as you can get. I've done a fair bit of shooting too (I wouldn't suggest robbing my house).

Just my thoughts.

Re: FPS Players: How should recoil be done?

Posted: Sun Aug 07, 2011 6:10 pm
by Dakatsu
I tried the conic recoil, but it looked really ugly. Yeah, it's functional, but Thenior is right in that basically any weapon will recoil upwards, and it looks so off recoiling left alone or even straight down.

I've taken time to look at how other games do this, and I think I've come up with a solution. Admittedly, most of this system is stolen from the game Red Orchestra, but that's because it is probably the most-accurate.

In general: Weapon recoils up, and left or right. Most games understate the left/right recoil.

Unaimed: The weapon itself recoils alone. The player camera does not follow. If the recoil gets really high (30-75°) the screen will follow. The weapon has a bit of "free-aim" and "lag," as in it will not always fire in the centre of the screen, but can be pointed a bit in a different direction. This is to prevent people from otherwise marking the centre of their screen. You can still, however, reasonably spray at a medium distance (100 metres) and hit stuff.

Aimed: The screen follows the weapon as it recoils. No lag or free-aim. The only inaccuracy here is the natural weapon inaccuracy and a slight weapon sway (which gets more intense if you've just sprinted a bunch or got shot in the arm).

The fact that the weapon can be only 15-75° or so away from the centre of the screen helps limit the whole "looking at the floor to shoot straight ahead" issue, while still having the weapon recoil upwards. This is not an issue when aimed, as you'd always be looking at where you are aiming.

Any critiques?

Re: FPS Players: How should recoil be done?

Posted: Mon Aug 08, 2011 10:08 am
by Sirius
Recoil is just Newtonian mechanics - if you apply a force to an object of a certain size in a certain location, it will always move the same way. Weapon recoil tends to be fairly consistent because weapons are always held in the same way and don't change shape between one shot and the next. That doesn't mean they couldn't recoil down, or left, if you're in space - if the gun is "down" relative to the object's centre of mass, it's going to spin the object in that direction as well. (Presumably you'd use stabilising thrusters to counteract this - which would take time, so there'd still be some recoil - or fire weapons in synchronised opposed pairs, in which case the only recoil is going to be backward.)

P.S. I seem to have assumed we're talking vehicular stuff - if not, ignore the text in parentheses :)

Re: FPS Players: How should recoil be done?

Posted: Mon Aug 08, 2011 3:43 pm
by Dakatsu
Sirius wrote:Recoil is just Newtonian mechanics - if you apply a force to an object of a certain size in a certain location, it will always move the same way. Weapon recoil tends to be fairly consistent because weapons are always held in the same way and don't change shape between one shot and the next. That doesn't mean they couldn't recoil down, or left, if you're in space - if the gun is "down" relative to the object's centre of mass, it's going to spin the object in that direction as well. (Presumably you'd use stabilising thrusters to counteract this - which would take time, so there'd still be some recoil - or fire weapons in synchronised opposed pairs, in which case the only recoil is going to be backward.)

P.S. I seem to have assumed we're talking vehicular stuff - if not, ignore the text in parentheses :)
Sadly we aren't, although I do plan on having vehicles. They'll work quite according to physics like you described - in most cases it'll push the ship/vehicle back, without any other directional recoil, unless it's a case like you mentioned, such as a side-mounted gun, or one shot from a heavy cannon on a wing of a spacecraft. It's just that people have arms that fight against recoil when it's a firearm :D

Re: FPS Players: How should recoil be done?

Posted: Mon Aug 08, 2011 9:40 pm
by Sirius
Right. It's fair enough, human-carried firearms typically do recoil up and/or backward, unless they have some fancy stuff like what woodchip linked.

Re: FPS Players: How should recoil be done?

Posted: Tue Aug 09, 2011 5:34 pm
by woodchip
A couple things to consider. size, length and weight of firearm and bullet size determine amount of recoil. A .22 pistol will recoil less than a .45. A .45 ACP pistol will recoil more that a .45 long gun shooting same size bullet. A ported rifle (precision drilled holes in barrel) will recoil less than the same rifle with no porting.

Re: FPS Players: How should recoil be done?

Posted: Tue Aug 09, 2011 5:48 pm
by Duper
What Woody said. Also, remember that some models of guns are designed to have less recoil.

Visually, (generically speaking) the gun should come back, while the muzzle climbs appropriately. The camera should THEN bump back a bit with a visual climb of oh.. 10 degrees or so? remember that you body absorbs some of that energy generally rocking your shoulders backwards.
Other factors will mitigate: prone position, stock type, muzzle break, is the person a trained and skilled shooter? A special ops would have better control over the guns energy due to practice; say 50% reduction plus or minus?


I'd like to add something about head bobbing. when walking or jogging about the center 1/3 to 1/2 of your vision does not move. Everything on the periphery does. try walking down a cubical isle way and notice how things on the edges of your vision bounce up and down while everything in the center (down the isle way) stays centered. Try it then while exaggerating your gate.
some food for thought.

:)