Game Development Reference
In-Depth Information
7.6.2 Precipitation
Rain and snow add yet another dimension to the game environment. Not
only do they look good but they add atmosphere and can be used to impair
the vision of the player strategically. Precipitation falls into a category of
computer graphics special effects called particle systems . They rightly deserve
a category of their own and as such will be dealt with in the next section.
7.7 Particles
Particle systems are objects constructed from the mass generation of
animated billboards. Each billboard represents a single particle. They are
used most commonly in games to generate fluidic and fuzzy phenomena
such as rain, snow, dust, fire, smoke, and explosions. The CloudsToy
implemented previously and the Detonator objects used in other chapters'
workshops are examples of particle systems.
A particle system consists of an emitter that spawns the particles at a
specific location. As they are created, each particle is given a velocity, size,
and life length. The particle begins its life, is scaled to the given size, and
travels off at the set velocity for the length of its life. At the end of its life the
particle is destroyed. For extra effect, a particle can be given a rotational
velocity, an animated color change, and size changes throughout its life.
Several example particle systems are illustrated in Figure 7.41 .
FIG 7.41 Particle systems: (a)
a uniform system with all particles
having a vertical velocity; (b) a
vertical system with random x and
y velocities, expanding size and
changing color; (c) a fire made with
three systems—one for inner glow,
one for flames, and one for smoke;
and (d) a water fountain.
Search Nedrilad ::

Custom Search