Fireballs and Spatialization
In this chapter, we will be adding all the sound effects and the HUD. We did this in two of the previous projects, but we will do things a bit differently this time. We will explore the concept of sound spatialization and how SFML makes this complicated concept nice and easy. In addition, we will build a HUD class to encapsulate our code that draws information to the screen.
We will cover the following topics in this chapter:
- What is spatialization?
- Handling spatialization using SFML
- Upgrading the
SoundEngine
class - Coding the fireball-related classes (derived from
Graphics
andUpdate
) that make spatialized sounds - Building some fireballs in the factory
- Running the code
The complete code for this chapter can be found in the Run6
folder.