January 2016
Intermediate to advanced
304 pages
6h 17m
English
With the sound effects added, we can now alter them to create variety. SFML offers a number of ways in which we can manipulate sounds, which includes the following:
We'll start with the simplest: the pitch. Then, we'll cover both the volume and position by creating spatialized sounds. These values will be set randomly each time we play a sound effect. Before we get into it, let's create a function to encapsulate the modification and playing of sounds. This will save us from having repeated code throughout the class.
Read now
Unlock full access