Summary
In this chapter, you added sounds to your game using the Web Audio API and got an overview of the API itself. The Web Audio API is very broad and has a ton of features, and I'd encourage you to explore it. Your first challenge is to use the gain
property to change the volume of the music, which is rather loud at the moment. The Web Audio API also supports features such as stereo surround sound and programmatically generated music. Have some fun and try it out!
You also added a new module to the game, and further extended the game engine to support it. We even covered refactoring and made some trade-offs to ensure the game would finish without requiring a time-consuming ideal design. I encourage you to take some time to add more sound effects to the game; you have the skills now to make RHB thud when he lands or crashes into a rock. Speaking of crashing into rocks, you're probably sick of having to hit refresh every time you do that, so in the next chapter, we&apos...