Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
First Person Shooters (Games) Games

How Do Bullets Work in Video Games? (gamasutra.com) 92

FPS (first-person shooter) games have been a staple in the video game industry ever since the explosion of Wolfenstein 3D back in 1992. Since then, the genre has been evolving with graphical upgrades, huge budgets, and an eSports ecosystem. But what about its core, the shooting mechanics? How have we progressed on that front? Why do some guns feel like it's the real thing, while others feel like toys?
This discussion has been archived. No new comments can be posted.

How Do Bullets Work in Video Games?

Comments Filter:
  • REALLY well (Score:5, Funny)

    by LynnwoodRooster ( 966895 ) on Monday December 23, 2019 @04:51PM (#59551482) Journal
    I find some 9mm, and even 38 Special (when I'm feeling nostalgic for the wheelgun) to really do a number on any video games, but rarely does the bullet end up staying in the video game. Usually just perforates right through.
  • Gonna guess (Score:5, Interesting)

    by Smidge204 ( 605297 ) on Monday December 23, 2019 @05:02PM (#59551528) Journal

    Before Ring-TFA:

    - Sound effects play a major part; both the sound of the gun and the sound of things being shot. Solid sound design makes a big difference.

    - The way objects react to being shot. If an enemy just soaks up bullets without flinching... or worse, stuttering as if stunned... it makes the weapons feel like toys. Enemies should react in expected ways, flinching appropriately, maybe staggering.

    - Appropriate physics. Hitscan weapons that damage in the same frame as the shot is weird. A slight delay is a minimum. Bullet drop, spread and aero effects are essential for more simulator-like games.

    *Reads article*

    Apparently my score is 300%. I was right about the physics, but apparently I put a lot more thought into this than the article author.
    =Smidge=

    =Smidge=

    • Before Ring-TFA:

      - Sound effects play a major part; both the sound of the gun and the sound of things being shot. Solid sound design makes a big difference.

      Yep.

      Doom 1 again: The imp-being-hit-by-shotgun sound is perfect.

    • Someone should make a game with Quentin Tarantino bullet effects.
    • It's a Gamasutra article, what did you expect? They're the origin of the disease that infected polytaku et al.

  • Why do some guns feel like it's the real thing, while others feel like toys?

    It boils down to casual vs hardcore, twitch style games vs "slower" games. With games like CoD, especially with multiplayer, the focus is on close combat, quick reactions, etc. So things like bullet drop isn't an issue, and they all have gun attachments that reduce/change things like bullet spread or recoil. Then you have games like Red Orchestra, Verdun, etc where combat is generally much slower and carried out over longer ranges and the ability to accurately line up shots and account for travel time/bu

    • or charging a trench with a 3-shot bolt action rifle

      There are three shot bolt actions??? I'm curious, what guns are these supposed to be? Even in WW1 bolt-actions generally held 5-10 rounds....

      Note also that the AK-47 wasn't really designed for hitting anything at 150-200m except by blind chance. It was never terribly accurate, and the low-power round made long-distance shooting iffy, at best.

      Yeah, I know - it's a game....

      • by Nidi62 ( 1525137 )

        The Berthier carbine was a 3 shot rifle issued by the French in WWI. One of my favorite rifles in the game Verdun(partly because of the sound), but that 3 round capacity is limiting. The French really liked to hamstring their soldiers-the Lebel was tube fed so took forever to reload and the Berthier only held 3 rounds.

        And true, in real life the AK wasnt greatly accurate at long range, but it used a larger round than the M-16.

        • Larger in bore, but that's about all. The AR in 5.56 is effective to around 400m depending on factors and definitions.

          • Yeah definitions matter. I've used 5.56 out to 600m; if you're a decent shot even at that range you'll still have about a 50/50 chance of hitting a human-sized target. Not stellar, but I'd still call it effective.

            • by Strider- ( 39683 )

              The primary reason for the switch to 5.56 was that statistics showed that the probability of the enemy being hit was directly proportional to the number of rounds put down-range. 5.56 rounds are significantly lighter than 7.62, thus allowing a soldier to carry more rounds for a given weight, which means more rounds they can put down range, and thus have a higher probability of hitting something.

              Assuming you’re fighting an enemy that cares for their wounded/injured, a slightly higher probability of wou

              • Yeah. That's why most armies teach that the effective range is 300-400 metres for an individual shooter, but 500-600 for a group firing on the same target. Put enough rounds down range and you'll hit it eventually.

              • But the 5,56 doesn't have the stopping power to disable a zombie without blowing through half a clip. Even if the effective range is shorter, it doesn't do you any good unless the zombie is actually disabled before it can reach you...

    • red orchestra is a horrible example for accuracy, the underlying mechanics for shooting were practically rolling dice. I can fire my mosin one handed better than their soldiers can prone, supported, with both hands.

  • BFG 9000 did it 2 ways.

    • by Z80a ( 971949 )

      When the weapons were not always hitscan like on 2D games or ID titles etc.. there were trade offs, strategies, enemy patterns etc.. Now with realistic weapons, is quite very hard to not fall into "just make the same darn hitscan gun but with different damage/firing rate/random chance to hit" trap that many, many, many games do and are all very boring for it.

  • by alvinrod ( 889928 ) on Monday December 23, 2019 @05:09PM (#59551550)
    Since the article actually describes different approaches for how bullets are implemented in games, I'm not sure why it chose to use a question in the title instead of a declarative statement about the contents of the article. You could even go with "How bullets work in video games." which is essentially the same, but conveys that the article will explain this to you, whereas the question mark makes this much less clear.
    • Re: (Score:2, Funny)

      by bloodhawk ( 813939 )
      because it is Slashdot, editors have a proud history of ensuring the title does not reflect the actual article, even when it is as obvious as this.
    • by AHuxley ( 892839 )
      Every game has a budget, level of staff skill, time to be ready for "sale"... as shareware... free..
      That puts limits on what an average home "computer" can do for that game ..
      That fun, instant, direct "arcade" setting on a ww2 flying game? Vs the advanced physics of the simulator setting?
      WW2, Vietnam game? What to do with the sniper rifle physics over long distances? Make it too easy? Very difficult?
      • ummm...

        I recall that the original Homeworld used actual bullet physics, but then its sequels used random number generator to-hit roll mechanics.

        So the arguments about limited development time is bullshit, and computational efficiency, etc, are also bullshit.

        Defender wall with 100 ships firing multiple bullets at a time each... bullets that are tracked from frame to frame... testing for hit collisions with hundreds of other ships... was done on... no better than single core 500MHz Pentium 3's and singl
        • by AHuxley ( 892839 )
          Re 'So the arguments about limited development time is' .. yet some rushed failed games had something new or did not.
          Re "computational efficiency' - yet decades of games had some "maths" to do just that if so needed...
          ie the "bullets that are tracked from frame to frame" shows just that .. make the staff do the work and they can do physics...
          Re 'random number generator to-hit roll mechanics."... make the staff not do the work and they dont have to worry about physics... for reasons...
          Welcome to the ho
    • by fazig ( 2909523 ) on Monday December 23, 2019 @11:54PM (#59552658)
      They don't even mention the Arma games. Hence I think they left out one interesting example.

      For the 3rd installment of the game there's the ACE3 mod with comes with an advanced ballistics simulation.
      In addition to the already above average bullet simulation, they add dynamic wind, which is affected by the terrain and also affects the bullts, Magnus effect, drag from air resistance (pressure, temperature, moisture) affects the trajectory and makes the bullets unstable as they get slowed, Earth rotation (Coriolis and Eötvös effects), powder burn rates which affect muzzle velocity.

      The mod is popular but also hated by many. They hate it not only because the additional simulation takes its toll on the game's (already bad) performance, but because the advanced ballistics make it (appropriately) difficult for snipers to be effective at longer ranges.

      There appears to be a point where the realism just becomes a little bit too much even for the Arma 3 type of player.
      But then again the first indicator for this would be how rare 1st person only servers are. Most people apparently just can't get by without a disembodied 3rd person camera, that allows them to look around obstacles without having to expose themselves.
      • by AmiMoJo ( 196126 )

        The problem with extreme realism is that you are playing with a mouse and keyboard. In real life you get a lot of feedback from the feel of things, the wind blowing against you, the g forces you experience when driving or flying.

        Absent those things it's harder to judge some stuff and easier to judge other things.

        • by fazig ( 2909523 )
          Mouse and keyboard is a problem, yes. There's just no way to give you the appropriate feedback that firearms do in reality.
          But I don't think that is a major factor in what I was trying to convey here.

          For example feelings like the wind blowing against you only help you marginally.
          The ACE3 mod even provides the player with appropriate equipment like the Kestrel 4500, which can measure a lot of weather features that are relevant for the shooter. You also have tools to measure the distance between you and t
          • Mouse and keyboard is a problem, yes. There's just no way to give you the appropriate feedback that firearms do in reality.

            Do I see a market opening for a mouse with programmable recoil?

            Hell, its Christmas - lets go whole hog and have keyboards with actual, exploding keys!

            • I don't see why not, game controllers have vibrational feedback. As long it can be turned off for normal computer use.
              It might be a little weird if they put that in a keyboard too though... then again, a space bar that shudders when you jump off and land might be kinda cool.

            • by fazig ( 2909523 )
              Interesting idea.
              However I wonder how you could replicate this faithfully. You do not have a lot of reaction mass to accelerate around in the finite space of a mouse. On top of that you do not hold a mouse like you would hold a pistol or straight grip.

              I suppose you could conceive a controller that uses a pistol grip and is mounted to some kind of modified electrodynamic shaker. Such a shaker is essentially a large software controlled and super powered speaker. We use such a device in our lab to test the
          • by Cederic ( 9623 )

            if you want to hit a target 2000m away from you/quote ..then you shouldn't be pretending you're playing realistically.

            Yes, I know snipers have done this in real life. No, most snipers have never even tried a 2km shot, let alone landed one, and the ones that have didn't get it with their first bullet.

            • by fazig ( 2909523 )
              It's just an example, as the vanilla ballistic of the game allow you to zero in your long range precision scopes for up to 2000m.

              The vanilla game lets you zero up and own in a gamified version of 100m steps, which magically takes into account what kind of cartridge in what kind of barrel is used. And if you use the mildots provided by the scope in addition to that you can pull off 2500m hits somewhat reliably with the CheyTac M200 Intervention (chambered in .408). Which is also its advertised effective r
          • by rho ( 6063 )

            Left out Tribes 2 as well. Arcing a disc to where some jerkwad is about to land and ruining his day is one of simple joys in life.

  • by jellomizer ( 103300 ) on Monday December 23, 2019 @05:10PM (#59551552)

    Firing a real gun vs a video game has a big difference.
    Video Games normally have a point in a general direction and shoot the targets will get his, while the bi standards will miss.
    Real life you need a lot of practice to fire a gun at the target. And in actual stressful conditions you may be moving at lot more then you think.

    • Re: (Score:1, Funny)

      by Anonymous Coward
      In a real life situation, the other students will hiding and dodging. You may also have teachers trying to be heroes and attempting to shield targets or tackle you.
      • That went dark, I was thinking of Target Practice (With a Paper Target), and Hunting Licensed to Hunt wildlife.

    • by Fallen Kell ( 165468 ) on Monday December 23, 2019 @05:39PM (#59551632)
      I think one of the things that people don't get from playing a video game is the difficulty level of actually pulling a trigger while keeping the weapon on target, especially with a pistol/handgun. Even some of the most heavily modified guns for accuracy will still have a 3-5 lb pull required for the trigger, but your typical off-the-shelf weapon is closer to 8lbs or more (case and point, the latest handgun adopted by the US military is the Sig P320, which has a typical trigger pull of 7.5lbs and this is designed for troops in a combat situation). Now to simulate that in a game, it would be pretty simple, change the location of the mouse button to be located instead of on the top of the mouse, to the front of the mouse (with the button's click motion forcing the mouse to wobble to mouse cursor in the vertical axis), and make it so that it takes 7-8lbs of pressure to click, then you will see how good your accuracy is in the game (bonus points to those who use two hands to stabilize the mouse just like you would need with a real weapon).
      • It's not the force required that most new shooters have problems with, it's jerking the damn trigger. Doesn't matter whether the pull is 1lb or 8lbs, if you don't have proper trigger control you're going to be all over the place.

      • by Solandri ( 704621 ) on Monday December 23, 2019 @06:48PM (#59551856)
        The ending of Unforgiven [youtube.com] has what's been called the most realistic Wild West shootout scene. One guy taking out five (from about a dozen) because he stays calm while the others are all flustered, too scared to shoot straight, and standing still or running away in a straight line.

        During WWII [shootingra...stries.com], about 45,000 bullets were fired for every combatant killed. In Iraq and Afghanistan [independent.org], that number is estimated to be 250,000 bullets per insurgent killed. It's actually pretty hard to be killed by someone shooting a gun at you (unless you're standing still or running away in a straight line while exposed).

        The same was true in ancient times. The Romans are estimated to have lost 855,000 battlefield casualties [necrometrics.com] during 9 centuries of combat, or about 1000 per year. Considering the Roman army numbered about 250,000 to 500,000 men, your chances of surviving combat were actually pretty good. Nothing at all like the gory scenes portrayed in movies and TV. The fighting ended not when one side was killed, but when they lost their nerve and fled from battle. (Historically, most combatant deaths have been due to disease, exposure, and starvation, not actual combat.)
      • That's why I got a 1911-pattern handgun, the sweet-ass trigger feel. Nothing else readily available is so easy to fire. That's probably why they are so commonly used by shooting champs. I tried out a few different guns before buying one. I also have a Peruvian Mauser with a sporting trigger that's super duper easy to shoot compared to the cheap junk (by comparison) that it came with.

        In some games all of this stuff is modeled, though. Different guns have different spreads to account for the ease (or lack the

      • I think one of the things that people don't get from playing a video game is the difficulty level of actually pulling a trigger while keeping the weapon on target, especially with a pistol/handgun.

        Even just a bow and arrow, it is really hard to release the string without introducing a slight bounce to the weapon arm. That's true even under no-stress situations with lots of time.

        It seems like pulling the trigger would be easy, but it engages the forearm muscles and naturally the arm will move a bit. Plus you expect the recoil, and that makes it hard not to yank on the trigger. It takes a lot of practices to stay relaxed and then squeeze smoothly without twitching, and ending with a tight grip to keep

    • Only video games I've seen that have gotten even close to what shooting a real firearm is like have all been quarter eaters in the mall arcade.

      Now of those.... quite a few with Uzi or Mac10 or Mac11 type auto pistols. Surprisingly similar to shooting a real Uzi or Mac11 (I have a friend who is a tax stamp collector so shooting full auto stuff is a somewhat regular thing for me.... )

      I also remember one from the late 70s/early 80s that was a video projector screen, and had O/U shotguns attached that would fi

      • by sad_ ( 7868 )

        "Only video games I've seen that have gotten even close to what shooting a real firearm is like have all been quarter eaters in the mall arcade."

        Operation Wolf!

  • by dryriver ( 1010635 ) on Monday December 23, 2019 @05:15PM (#59551568)
    As far as the modeling of the guns goes, its a simple bunch of variables, timers and maybe the odd physics or virtual spring formula that determines how the "gun" behaves. You can even use a virtual physics 3D cube constrained by virtual physics springs to model things like gun recoil or shake. Not difficult. The physics engine (e.g. Havok, PhysX) will do it for you in realtime. All realtime 3D game engines made in the last 20 years can also shoot virtual "rays" into the 3D scene at any angle you want with a single line of code, and report back where and at what angle collision with a 3D object occurred. That is how the game calculates where the bullet goes and what it hits, often placing a bullet hole decal - a simple texture with alpha channel - to make bullet holes. It models a straight line with maybe a "bullet falling due to gravity over distance" offset parameter. If you want to get fancy, any game physics engine worth 2 pennies can also model the flight behavior of a bullet using a simple 3D cube with mass. You don't have to use completely straight rays, but rather fire a simulated physics rigidbody into the 3D scene. An interesting aspect is that in almost no games, bullets ricochet off stones or metal items, which can also be modeled very easily with "rays". You shoot a 1st ray into the scene, it hits something, then you shoot a 2nd ray at an angle from the impact point, and you've got ricochet behavior modeled. But COD, Battlefield and so on don't do this the last time I checked, even though its dead easy to implement. What would it do to gameplay? When you fight someone in a tunnel or hall or other interior, you wouldn't have to aim right at your adversary. Bullets could ricochet off the walls/ceilings and still hit an adversary. No idea why game companies like EA can't be bothered to implement this, as it is dead simple. Just take the code or physics mechanism that takes the bullet from gun barrel to target, and "re-shoot" the bullet from the impact point at an angle. Online play would actually be more interesting with this mechanic, and things like grenades already bounce of walls - if they can do that, they can do bullet ricochets as well.
    • by barakn ( 641218 )

      Accurate ricochet physics would be extremely difficult to model, The bullet, unless it is bouncing off a liquid surface, is going to deform drastically and more than likely will fragment. The surface will chip or spallate, and in a thin surface or one composed of layers, the surface will essentially bounce back and explode (note: really mangling shockwave physics here to keep it short). It might be most easily modeled as a combination of a shotgun blast and a bullet of a smaller caliber reflecting the us

    • No idea why game companies like EA can't be bothered to implement this, as it is dead simple.

      I don't know why they don't either, but I do know that in real life that's not how it works at all. See some experiments with the 'simple' case of a driver shooting through a windshield for example.

    • by Kjella ( 173770 )

      Because it'd either be predictable and then you'd have people practicing to "shoot around corners" or it'd be realistic and pretty damn random which makes it more of a button masher and less about skills. Yes in real life it would be more chaos but I think in this case more realism is less fun. Much like realistic injuries, I'd never run around so gung-ho with a real gun as in a game. Nobody wants to play a game that's so dull, or well not dull because I'd be trying to save the one life I have, but where so

      • by ceoyoyo ( 59147 )

        Back in grad school my supervisor caught us all playing Warcraft on the lab network. He didn't want to play Warcraft so he bought Medal of Honour. One undergrad was pretty good at FPSs, good enough that the supervisor got frustrated. So he installed a realism patch. Now when he got shot from across the map he died in one or two shots, instead of ten.

    • Destiny 2 does have some guns with optional ricochet rounds.

    • Ricocheting bullets is basically Pong or Breakout, and should be very trivial to add to a shooter. Even a computer from 30 years ago can do a smooth full 3d version of Pong with the associated physics
  • by Dunbal ( 464142 ) * on Monday December 23, 2019 @05:29PM (#59551602)
    I dunno, I feel the weapons are simulated quite [youtu.be] accurately [youtu.be]... I depends on how complicated [youtu.be] you're willing to get. Of course if you're just bitching about games like Fortnite then you get what you pay for.
  • In the real world you do not go around and murder a few hundred people.
    FPS games are either real time puzzle games (where a single hit is game over), agility games, or anything between. No where in there are you actually ending anything's life, nor "defending" your lawn.

    • No where in there are you actually... "defending" your lawn.

      Speak for yourself, Sonny. Oh, yeah, and get off my lawn. No seriously, the sprinklers are about to come on.

  • Most of the better games and skilled people to know how to code ... and thought of the "physics"..
    Unless art work, plot, lack of CPU and GPU skills needed some real limits put on that decade of game design.
    Hire really smart people, get really good game design.
    Cant hire the skilled staff? Get less ability to "think" about world and game physics...
    Study more, learn more, if the "word" design needs gravity, code for it...
    Did not consider that? Hire much better staff and start again.
  • The bullets work like the ball in Pong, only there is no bounce back. I don't know if any games do all of the following, and I am only going to talk about a basic gun like a pistol or a shotgun. I'm going to focus on Doom and Brutal Doom for examples 1 - ricochet - a bullet needs to ricochet, depending on the material it hits. You could shoot at a solid steel wall in Doom all day, and be secure in the knowledge that not one of your bullets will bounce back and hit you. 2 - recoil/kickback. Most shooters to
    • The Borderlands series fields many a gun with ricocheting bullets (of the lesser "just reshoot from the reflecting surface" variety). And all the weapons appear to have time of flight, and some have bullet drop. Then again you've guns shooting explosive swords, homing darts and seeker shotguns; they're not even trying for realism.
  • There is a line where "too realistic" hurts gameplay. I've been trying to master The Hunter: Call of the Wild. Very, very hard game to get proficient at. Bullet drop, wind, and then vital organ hits (or mostly miss), blood loss, then tracking for non-critical hits. Not to mention ammo type and firearm - Don't shoot a blackbear with a .243 unless you're going to get very, very lucky - and most likely you're just going to get dead from being mulled to death after making it mad. Wow, very hard, but then s

    • by Cederic ( 9623 )

      Rifles/pistols/shotguns don't take wind into account in COTW. Bows do.

      But yeah, you do get much better at it. Avoid moose as they'll run for miles (literally) if you wound them and get the 'hit F to change zero' perk/skill as quickly as you can, then you'll start getting better very fast.

      E.g. I bought the latest DLC (Spain), picked up the new 6.5mm rifle that comes with it, found a nice viewpoint to test its accuracy and made a judgement call on bullet drop. Lung shot instakill on a deer at just over 400m.

      I

  • Here is a talk from GDC about how to make bullets fly:

    https://www.youtube.com/watch?... [youtube.com]

  • I found it interesting that there was always 12 pellets in Quake, which had a fairly random spread. In Half-Life, bullets could pass under your arm without hitting you because the models had hit volumes.
  • i wish all games would be a bit more realistic with those bullet magazines. You got 12 bullets in that mag and you reload when you shot 2, you lost 10 bullets. This is when developers will get my respect. Just put it as an option at least.
  • ... someone can consider that a gun could possibly feel like a toy. One is a tool designed for killing people, and the other is a toy.

    I bet the person who wrote that comment was an American gun-nut (the two classes, "American" and "gun-nut", largely overlap) who wants children in potty-training (or earlier) school to learn how to kill people before they learn to control their excretion organs. Or, just execute the motherfuckers, as Tarantino would put it.

  • For me it is always hard to switch between different games because mechanics can differ significantly and you are trying to get used to physics of the game all the time. But with a good mouse it's not that hard. Glad that I got one a few years ago. Now I want to also switch my keyboard to a good one. Been reading this guide [cwhonors.org] and those options are pretty attractive.

For God's sake, stop researching for a while and begin to think!

Working...