Calculating Bullet Accuracy: A Game %Guide

AI Thread Summary
Calculating bullet accuracy in a game involves understanding the bullet's trajectory and how it deviates from a straight line due to gravity. The discussion suggests using a basic formula derived from projectile motion, where the vertical drop can be calculated with y = (1/2)gt^2, while horizontal distance is determined by x = Vox*t. Accuracy can be modeled by introducing random angular displacement to simulate human error and environmental factors, such as barrel imperfections and wind. The key takeaway is that faster bullets experience less vertical drop over distance, leading to improved accuracy. Overall, the conversation emphasizes the importance of simplifying calculations for gameplay while maintaining realism.
KCE
Messages
1
Reaction score
0
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?
 
Physics news on Phys.org
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.)
 
cesiumfrog said:
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.
 
Consider an extremely long and perfectly calibrated scale. A car with a mass of 1000 kg is placed on it, and the scale registers this weight accurately. Now, suppose the car begins to move, reaching very high speeds. Neglecting air resistance and rolling friction, if the car attains, for example, a velocity of 500 km/h, will the scale still indicate a weight corresponding to 1000 kg, or will the measured value decrease as a result of the motion? In a second scenario, imagine a person with a...
Thread 'Gauss' law seems to imply instantaneous electric field propagation'
Imagine a charged sphere at the origin connected through an open switch to a vertical grounded wire. We wish to find an expression for the horizontal component of the electric field at a distance ##\mathbf{r}## from the sphere as it discharges. By using the Lorenz gauge condition: $$\nabla \cdot \mathbf{A} + \frac{1}{c^2}\frac{\partial \phi}{\partial t}=0\tag{1}$$ we find the following retarded solutions to the Maxwell equations If we assume that...
Dear all, in an encounter of an infamous claim by Gerlich and Tscheuschner that the Greenhouse effect is inconsistent with the 2nd law of thermodynamics I came to a simple thought experiment which I wanted to share with you to check my understanding and brush up my knowledge. The thought experiment I tried to calculate through is as follows. I have a sphere (1) with radius ##r##, acting like a black body at a temperature of exactly ##T_1 = 500 K##. With Stefan-Boltzmann you can calculate...
Back
Top