Chapter 11. Sound Effects, File I/O, and Finishing the Game

We are nearly there. This short chapter will demonstrate how we can easily manipulate files stored on the hard drive using the C++ standard library, and we will also add sound effects. Of course, we know how to add sound effects, but we will discuss exactly where in the code the calls to play will go. We will also tie up a few loose-ends to make the game complete.

In this chapter we will learn the following topics:

  • Saving and loading the high score
  • Adding sound effects
  • Allow the player to level up
  • Create never-ending multiple waves

Saving and loading the high-score

File I/O, or input/output, is a fairly technical subject. Fortunately for us, as it is such a common requirement in programming, ...

Get Beginning C++ Game Programming 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.