Game Development Reference
In-Depth Information
The next is the initial velocity of the bullet. The bullet here refers to the actual metal
projectile that leaves the barrel; the thing that you load into the gun is called a round
and contains a casing, gunpowder, a primer, and, of course, the bullet. The initial velocity
is usually measured just after the bullet leaves the muzzle (the end of the barrel) and is
appropriately called the muzzle velocity . Every kind of ammunition is tested at the fac‐
tory and given a muzzle velocity. You can add realism to your game by giving different
ammunition different muzzle velocities. This way, a handgun round won't have the same
range as a rifle round. Ammunition also comes with a bullet weight measured in either
grams or grains. One grain is equal to 0.0648 grams and is an old unit based on the
weight of a single seed of wheat!
Last, but not least, we need some approximation for the way air resistance will affect
the flight of a bullet. This is where things start to get interesting for people studying
ballistics, but we'll stay away from exotic aerodynamics and use our existing drag model.
First, we should review the current state of first-person-shooter physics.
Firearms in games present a unique problem to the game developer. If you have ever
been to the firing range, you know that in reality it takes a good deal of practice and
concentration to hit a target reliably. Considering that target shooting is hard enough
to be an Olympic sport under very controlled circumstances, the ability for in-game
characters to spring from cover and shoot five enemies with five bullets is somewhat
superhuman. We have all played games where you find yourself shooting a target very
far away, and the procedure is as simple as pointing the crosshair where you want the
bullet to go and clicking the mouse button. In reality, the skill needed to get a bullet
weighing a few grams to hit something a few hundred meters away is so complicated it
is amazing that anyone does it with regularity. For those developers wishing to actually
model firearm performance in their game, there is a double-edged sword to consider.
The physics of what happens to the bullet in its flight are not simple to boil down.
However, the behavior of the bullet as it flies downrange is important in the practical
art of marksmanship. There has been considerable work done to find a way to compare
ammunition so that a hunter or marksman can predict the performance of a particular
ammunition. The result is a pseudophysical factor called the ballistic coefficient (BC).
The BC is a ratio that determines the ability of a particular bullet to retain its downrange
velocity compared to some standard bullet. The most common form is that of the G1
reference projectile. However, this number has limited use, as it does not take into
account modern bullet shapes that provide very low drag. There are updated models
whose designations are G2, G3, and ECT. If you are interested in the details of highly
accurate ballistic modeling, there are a few free programs that can provide you in-depth
models such as Remington's Shoot! and the GNU Ballistics program. Given that most
first-person shooters don't yet include wind effects or bullet drop, we'll limit ourselves
to a simplified method of turning the existing parameters in the Chapter 6 projectile
Search Nedrilad ::

Custom Search