Chapter 11
Finishing the Painter Game
In this chapter, you will finish the Painter game by adding a few extra features such as motion effects, sounds, and music, and maintaining and displaying a score. Finally, you will learn about characters and strings in a bit more detail.
Adding Motion Effects
In order to make the game more visually appealing, you can make the paint cans swing back and forth slightly to simulate the effect of wind and friction on the falling motion. The PainterFinal program that belongs to this chapter is the final version of the game with this motion effect added to the cans. Adding such an effect isn’t complicated. Thanks to the work you did in the previous chapter, only a single line needs to be added to the updateDelta ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access