Summary

We brought the game world to life in this chapter. We drew a HUD to show the player their remaining health and coin score, added parallax backgrounds to increase the depth and immersion of the world, and learned to use particle emitters to create special graphics in our games. In addition, we added a small delay before gravity drags our hero down at the beginning of each flight. Our game is fun and looking great!

Next, we need a menu so we can restart the game without rebuilding the project or manually closing the application. In Chapter 9, Adding Menus and Sounds, we will design a start menu, add a retry button when the player dies, and play sounds and music to create a deeper gameplay experience.

Get Game Development with Swift 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.