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 ...

Get Swift Game Programming for Absolute Beginners 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.