
66 Chapter 4 TheParticlePhysicsEngine
FIGURE 4.3 Screenshot of the fireworks demo.
4.2 Fireworks
Our second ex ample may appear less useful, but demonstrates a commo n application
of particle physics used in most games. Fireworks are just a very ostentatious applica-
tion of a particle system that could be used to display explosions, flowing water, and
even smoke and fire.
The fireworks demo in the source code allows you to create an interactive fire-
works display. You can see a display in progress in Figure 4.3.
4.2.1 The Fireworks Data
In our fireworks display we need to add extra data to the basic particle structure. First,
we need to know what kind