Preface
Since the introduction of iOS 8 in 2014, game development for the iOS platform has gone through some major changes. The first of those changes was the introduction of the Swift programming language, a functional programming language made by Apple to be simple to code and modern in its capabilities, all while being fast enough to handle modern app and game development. iOS 8 also introduced the 3D game development framework, SceneKit. SceneKit allowed developers to quickly design 3D games and work with 3D assets in a similar fashion to iOS 7's SpriteKit. A year later, in the summer of 2015, iOS 9 was introduced, along with a new set of tools for both seasoned and brand new iOS game developers. The new framework, GameplayKit, lets developers handle the game rules, AI, game entities, and game states separately from the inheritance logic. In addition to GameplayKit, Apple showed off the Fox game example that displays how Xcode can now do much of the same visual editing functionalities seen in multiplatform game engines, such as Unity and Unreal Engine.
We will first become familiar with the Swift programming language and how it can be used in the scope of game development. The goal is to understand iOS game development from the ground up, learning the tougher code-centric methodology of making a game. In addition to taking a look at Apple's own example projects for the various iOS game frameworks, we will see some code examples from two games, the first game being a published Swift-developed 2D scrolling game named PikiPop and the other being a tile-based Minesweeper clone named SwiftSweeper. As we progress through the book, we will still keep code as the core of our method for game development, but will look into the visual tools introduced in iOS 9 that, in addition to GameplayKit and the component-based structuring, can allow us to create a game that is only limited by our imagination. We then dive into topic of the low-level APIs, such as OpenGL ES and Metal, for developers who wish to get down directly to the GPU.
In the end, we hope that you understand how iOS continues to be a power game development platform, whether you are a developer who comes from the traditional code-centric school of computer science, or you are a part of the growing visual-based/drag-and-drop design paradigm. Our goal is that when you are finished with this book, you will have a number of vastly different and detailed game ideas, which you then can immediately begin building with Swift and the iOS 9 platforms.