Summary

In this chapter we learnt about strings, SFML Text, and SFML Font. Between them they enabled us to draw text to the screen, which provided the player with a HUD. We also used sstream, which allows us to concatenate strings and other variables to display the score.

We explored the SFML RectangleShape class, which does exactly what its name suggests. We used an object of the type RectangleShape, and some carefully planned variables, to draw a time bar that visually displays how much time a player has left. Once we have implemented chopping, and moving branches that can squash the player, the time bar will create tension and urgency.

Next we are going to learn about a whole range of new C++ features, including loops, arrays, switching, enumerations, and functions. This will enable us to move the tree branches, keep track of their locations, and squash the player.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.68.28