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

Preface

Sprite Kit is a new framework from Apple for developing 2D games for iOS devices. It is new, fresh, and exciting.

Developers have been waiting long for a native library for games, but Apple did not deliver it until Version 7.0 of their operating system. Developers had to use unreliable third-party libraries, work on fixing bugs in these libraries, and experiencing headaches when suddenly your project just stops compiling under new versions of the operating system.

All these problems can be forgotten with the new Sprite Kit framework. It allows for easy and fast game development. It mimics many methods and the API of the Cocos2d library, which is a wildly popular library for game development. If you have ever checked out Cocos2d, you will feel right at home with Sprite Kit.

iOS 7 Game Development will take you on a journey to build a game from scratch using a hands-on approach. We will start with the basics and continue with advanced topics. We will explain every bit of code for maximum understanding.

We will build an endless runner game, an amazingly popular genre on the App Store, and will explain all the systems that have to be built in order to provide the best user experience.

What this book covers

Chapter 1, Updates on iOS 7, provides you with a short coverage of what features iOS 7 brings to the table—operating system redesign, new frameworks, and game controller support.

Chapter 2, Our First Sprite Kit Project, explains you Sprite Kit basics, how to show a sprite on the screen, how to move it, and what properties and methods are available on sprite nodes. We will also discuss game loops and actions.

Chapter 3, Interacting with Our Game, shows you the way to control our character sprite, either by using gesture recognizers or with raw touch processing.

Chapter 4, Animating Sprites, walks you through the process of creating a texture atlas, animating our character, and creating actions to handle starting and finishing animations. We will also add nice parallax scrolling to our game.

Chapter 5, Particle Effects, explains how to create cool-looking particle effects, how to store and edit them and their properties, and ways to improve your game performance when using particle effects.

Chapter 6, Adding Game Controllers, walks you through the process of adding native game controller support to your game. We will check different controllers, their layouts, and ways to handle thumbstick, direction pad, and button inputs.

Chapter 7, Publishing to the iTunes App Store, explains how to post your application to the iTunes App Store. We will learn about different application icons, categories, certificates, provisioning profiles, new Xcode publishing features, and the review process.

What you need for this book

You will need a Mac running OS X 10.9 and Xcode Version 5.0 or higher. You are expected to have familiarity with Objective-C.

Who this book is for

This book is intended for those who have great ideas for games and who want to learn about iOS game development. You should know and understand Objective-C. Being familiar with iOS development is helpful, but is not required. This book will make you familiar with the new Sprite Kit framework in no time.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: “The thing that might have caught your attention is the format specifier @”run%.3d”.

A block of code is set as follows:

- (void) stopRunningAnimation
{
    [self removeActionForKey:@”running”];
}

New terms and important words are shown in bold.

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.