Book Image

iOS 9 Game Development Essentials

By : Chuck Gaffney
Book Image

iOS 9 Game Development Essentials

By: Chuck Gaffney

Overview of this book

Table of Contents (15 chapters)
iOS 9 Game Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating our game logic


For the sake of simplicity, MineSweeper won't have many different assets or any sprite textures. It instead uses Swift's Unicode emoticon character capabilities and UIView calls to design the game's graphics in a rather old-fashioned, very MineSweeper-like way.

Not only do we do this to give us a somewhat simplistic starting point, but to show how Swift code and SpriteKit classes can let us create the entire game's logic and flow without the initial need of sprite assets. This way, if developing as a team or by yourself, the game can be made before doing the sometimes grueling process of making wonderful visual assets. Thinking with code and structure first can ensure that you have a working prototype that you can polish later with sprites, music, and atmosphere.

We've so far left SwiftSweeper waiting as just a shell of the SpriteKit game template. It's about time we get to the game's model:

  1. First, let's add our image assets. For more information, visit https://mega...