Game Development Reference
In-Depth Information
virtual void updateForce(Particle *particle, real duration) = 0;
set objects spinning.
Concussion Wave
The concussion wave (also called the “shockwave”) is initiated by the initial implo-
sion: air rushes into the vacuum, creating an expanding wavefront. This may be com-
bined, near the explosion site, with shrapnel and munition fuel expanding from the
weapon. For very high-temperature devices the wavefront may comprise burning air,
known as a “fireball” (characteristic in atomic and nuclear devices).
The concussion wave throws objects outward from the explosion. In movies and
games it is responsible for cars flying through the air and characters being knocked
off their feet.
The characteristic of a concussion wave is its propagation. It spreads out from the
point of explosion, getting weaker as it goes. Like a surfer always on the outside edge
of a water wave, light objects can ride the outside edge of the concussion wave and
accelerate to very high speeds. But like a surfer who doesn't catch the wave, most ob-
jects will receive an initial boost at the wave boundary, and then will behave normally
when inside the wavefront.
We can implement this in our force generator by applying forces to objects within
an expanding interval from the blast point. The interval should be wide enough so
that no objects are missed. Its width depends on the frame-rate and the speed of the
wavefront, according to the formula
where s is the speed of the wavefront, w is the width of the interval, and fps is the
number of frames per second. In other words, w is the distance the wave travels in
one frame. In practice, objects on either side of this peak should also get some force,
but to a lesser extent. The force equation
f b ( 1
when st
d < st
f b
when st
d < st
f a =
f b (d
when st
d < st
1 )w
has proved useful for me. In it st is the position of the back of the wavefront (i.e., the
speed times the time), k is the width of the tail-off on either side of the wave, d is the
Search Nedrilad ::

Custom Search