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

SpriteKit / SceneKit interactivity


One great feature of SceneKit is that we can have a SpriteKit scene overlay our 3D game.

self.overlaySKScene = skScene

Using the SCNView property overlaySKcene, we can take an already established SKScene node (which can be a character, an animation sequence, an HUD, and more) and have them in our 3D scene.

Want to have a cute sprite animation overlay your 3D character's stage win or maybe want to make a 2.5D game with 2D sprites and physics overlaying a 3D background? Then this is how you can do it.

The most common functionality of mixing SpriteKit with SceneKit is that SpriteKit is the HUD for the SceneKit scene. The lives, collectables, and character icon seen in the earlier Fox demo shows a SpriteKit node overlaying a SceneKit scene.

Nodes in general can help add a functional structure to your game and game scenes. A high reliance on nodes and inheritance in game design doesn't come without its flaws though.

The issue with inheritance-based structuring and...