Book Image

Mastering iOS Game Development

By : Peter Ahlgren, Miguel DeQuadros
Book Image

Mastering iOS Game Development

By: Peter Ahlgren, Miguel DeQuadros

Overview of this book

iOS is an operating system for Apple manufactured phones and tablets. Mobile gaming is one of the fastest-growing industries, and compatibility with iOS is now becoming the norm for game developers. SpriteKit is part of the native SDK from Apple, and enables developers to make simple entry into game development without unnecessary overhead and a long learning process. SpriteKit also provides other functionality that is useful for games, including basic sound playback support and physics simulation. In addition, Xcode provides built-in support for SpriteKit so that you can create complex special effects and texture atlases directly in Xcode. This combination of framework and tools makes SpriteKit a good choice for games and other apps that require similar kinds of animation. Become a master in iOS game development through this fast and fun guide! In the beginning, we’ll tell you everything you need to plan and design your game. You’ll then start developing your game through step-by-step instructions using the various built-in technologies of Xcode. From there on, we discuss how to deploy your game to the iOS App Store, as well as monetizing it to make more revenue. You will also learn advanced techniques to improve your game playing experience, including better multi-tasking, improved performance optimization, battery management, and more. To end the book off, we’ll show you how to update your game with different features, then port the update to the App Store.
Table of Contents (15 chapters)

Squashing those bugs!


This is a tedious thing to do. To be honest, debugging will take you many hours of figuring things out, especially when you're just starting out and don't know the code all that well. Trust me, it will take some time, but don't worry; it's worth the effort.

Let's take the app we've created, I sent it to a friend to test, and here is a snippet of the device log he lovingly sent to me:

Size (256.000000, 256.000000)
2015-06-11 21:24:04.357 Adesa[11289:1870205] Layer background has zPosition -60.000000
2015-06-11 21:24:04.363 Adesa[11289:1870205] Layer walls has zPosition -40.000000
2015-06-11 21:24:04.364 Adesa[11289:1870205] Layer hazards has zPosition -20.000000
2015-06-11 21:24:06.725 Adesa[11289:1870205] PEW
2015-06-11 21:24:21.971 Adesa[11289:1870205] PEW
2015-06-11 21:24:22.158 Adesa[11289:1870205] PEW
2015-06-11 21:24:22.391 Adesa[11289:1870205] PEW
2015-06-11 21:24:22.511 Adesa[11289:1870205] PEW
2015-06-11 21:24:22.911 Adesa[11289:1870205] PEW
2015-06-11 21:24:23...