Chapter 5: Collisions, Sound, and End Conditions – Making the Game Playable

This is the final phase of the first project. By the end of this chapter, you will have your first completed game. Once you have Timber!!! up and running, be sure to read the last section of this chapter as it will suggest ways to make the game better.

In this chapter, we will cover the following topics:

  • Adding the rest of the sprites
  • Handling the player input
  • Animating the flying log
  • Handling death
  • Adding sound effects
  • Adding features and improving Timber!!!

Preparing the player (and other sprites)

Let's add the code for the player's sprite as well as a few more sprites and textures at the same time. The following, quite large, block of code also adds a gravestone ...

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