Book Image

Swift by Example

By : Giordano Scalzo
Book Image

Swift by Example

By: Giordano Scalzo

Overview of this book

Table of Contents (15 chapters)

Chapter 7. Cube Runner

In the last two chapters, we saw how easy it is to implement a 2D game using SpriteKit.

Probably, most of you think that implementing a 3D game is something that only professional game developers can do, because it needs knowledge of 3D graphics, math, rendering, lights, and so on, as well as external tools such as Unity.

That might have been true until Apple released SceneKit, a really simple 3D rendering framework, created mainly for hobbyists and casual game developers. First introduced in OS X Mountain Lion, it became even more powerful in 2014, with the addition of particle effects, physics simulation, and multipass rendering. It was added to iOS 8, allowing the community of iOS developers to implement 3D applications using a model similar to Sprite Kit and UIKit in general.

In this chapter, after a brief introduction to SceneKit using Playground, we'll implement an iOS clone of a fun Flash game.