# Calculating Bullet Accuracy: A Game %Guide

• KCE

#### KCE

Hi. I was wondering if it's possible to calculate bullet accuracy in terms of percentage in a series of ranges, given bullet's max effective range, a series of ranges, bullet mass and velocity with gravity (assuming no wind resistance, or any frictional resistance). I'm looking for a simple/basic formula, if there is any (this is for a game). When I say accuracy, I mean in terms of how far the bullet is from the axis of the barrell since technically the bullet can never go above it (technically accuracy should be judged without a series of shots and how close they are to a target). 100% accuracy means it would stay perfectly straight. The way I see it is, the closer a target is the more accurate the bullet is because it still has enough force to keep going straight so accuracy and range should scale proportionally and thus at a further range the bullet would be less accurate due to gravity pulling the bullet down, so the faster a bullet travels the further it can go?

Okay I don't understand your question. As I get it, you want to have a game that has shooting in it but you want to introduce variation in where the bullet goes. What I would do is assume the gun shoots the same every time and introduce random pointing variation. In other words, I would start with the direction pointed and add a small term to the azimuth and to the elevation. Something in the order of a minute of arc. Now, as far as the trajectory, the distance traveled depends on speed which varies with distance, the trickiest part of the process. The fall depends only on the time, that's easy. So what assumptions are you making regarding the velocity? Without air you are talking ballistic trajectories. Distance = speed * time. So a target 100 units away with a bullet traveling 50 units/sec would travel 2 sec and fall gt^2 = 4g units (aim high!). Is this close?

With or without air, I'm guessing the main source of inaccuracy would be the person holding the rifle (trembling slightly and allowing varying recoil). Thus, you'd just put a random (guassian) angular offset on the initial firing direction, which seems to be what most games are doing now anyway.

With air it might be quite interesting mathematically: The buffetted bullet is doing a random walk in some sense, which normally gives $\sqrt N$ effects, except that the early part of the walk is being amplified to have greater effects than the late part. (Presumably, this would reduce to saying the angular size of that guassian depends on the distance to target.)

With or without air, I'm guessing the main source of inaccuracy would be the person holding the rifle

Depends upon the person. There are also barrel imperfections and oscillations, as well as those dratted gusting cross-winds, that will still take their toll on the best shooter in the world. In fact, if a barrel isn't crowned correctly, just the gas erupting from the muzzle can throw a bullet off track.

hmm well assuming that your not making some new game for the PS3, you should probably stick to just randomizing the angular discplacement of the barrell, as that would be the least computationally difficult, and its quite reasonable from the gamers perspective.

well what you're asking for is the variation of the bullet from its straight line path due to gravity. u can calculate this using projectile motion, and yes its dependant on speed. let's start the equations.lets consider the initial height from which the bullet is fired to be the reference position,or the zero height pt, then the equation simplifies to: y=(1/2)gt^2 + Voy*t. g is the gravitational acceleration or 9.8 m/s^2, and Voy is the initial y-velocity which is zero. the whole equation becomes y=(1/2)gt^2.where y is our current position.Now for the x-calculations or the range, since no x-accelerations then x= Vox*t Vox is the initial speed of the bullet and time is the time it spends in the air which is determined by the first equation. If u need to calculate the accuracy in terms of range then combine the 2 equations u get: y=(1/2 g)(x/Vox)^2 since all except y and x are constants u can get the variation of height of the bullet with every x meters. Mass is irrelevant, but as u see the larger Vox the smaller y thus smaller variations, Air resistance is negligeable in your case, because its very complicated.