20
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 ...
Get Beginning C++ Game Programming - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.