Book Image

iOS Game Programming Cookbook

Book Image

iOS Game Programming Cookbook

Overview of this book

Table of Contents (19 chapters)
iOS Game Programming Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Anatomy of game projects


In this section we will see the basics of a game project. This includes understanding the basic architecture and work flow of game projects. Here we will learn about the scene and layers and their importance in games.

Getting ready

Complete game development is dependent on three core components: scenes, nodes, and sprites mentioned earlier. We need to have a command over these components to effectively start on game development.

How to do it...

Internally, the life cycle is executed as per the scenes—nodes are added and actions applied on these nodes. It also includes attaching some physics bodies to the nodes, support for cropping, applying animation and effects to all or a part of the content, detecting forces and collision, drawing in OpenGL, and many more things.

Apart from all this, there is an overridden update method in SKScene, which is called for each frame of the game with the current time interval as a parameter. There you can add your actual game logic specifying...