Book Image

iOS 7 Game Development

By : Dmitry Volevodz
Book Image

iOS 7 Game Development

By: Dmitry Volevodz

Overview of this book

<p>Sprite Kit, a new framework introduced in iOS7, has been designed as a built-in animation workflow for keyframing 2D animation without the need of engines such as Unity to serve as an intermediate. Sprite Kit enables the easy and fast development cycle, leaving more time to work on gameplay and polish, and less on tedious tasks.</p> <p>This book offers a practical approach to game development with the Sprite Kit framework of iOS7 platform, by creating an endless runner game. You will gain a full understanding of the new Apple framework along with tips and tricks to interact with the game either by detecting taps, using sophisticated gesture recognizers, and moving sprites by dragging.</p> <p>Starting with how to get your first sprite on screen, and then moving on to complicated physics and animations, we will be learning about the new features that iOS7provides for game development. You will also learn how to optimize your game performance, how to add animation files and create texture atlas in Xcode 5, and how to build different particles. By the end of the book you will learn how to create full featured endless runner game, with animations, sound effects and particle systems, how to post you application to the iTunes Appstore and about different application icons, categories, certificates, provisioning profiles, new Xcode publishing features and review process.</p> <p>This book will teach you everything you need to know to create your own powerful and immersive games.</p>
Table of Contents (14 chapters)
iOS 7 Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Anatomy of a Sprite Kit project


A Sprite Kit project consists of things usual to any iOS project. It has the AppDelegate, Storyboard, and ViewController classes. It has the usual structure of any iOS application. However, there are differences in ViewController.view, which has the SKView class in Storyboard.

You will handle everything that is related to Sprite Kit in SKView. This class will render your gameplay elements such as sprites, nodes, backgrounds, and everything else. You can't draw Sprite Kit elements on other views.

It's important to understand that Sprite Kit introduces its own coordinate system. In UIkit, the origin (0,0) is located at the top-left corner, whereas Sprite Kit locates the origin at the bottom-left corner. The reason why this is important to understand is because of the fact that all elements will be positioned relative to the new coordinate system. This system originates from OpenGL, which Sprite Kit uses in implementation.