Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS 9 Game development Essentials

You're reading from   iOS 9 Game development Essentials Design, build, and publish an iOS game from scratch using the stunning features of iOS 9

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781784391430
Length 224 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Chuck Gaffney Chuck Gaffney
Author Profile Icon Chuck Gaffney
Chuck Gaffney
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. The Swift Programming Language 2. Structuring and Planning a Game Using iOS 9 Storyboards and Segues FREE CHAPTER 3. SpriteKit and 2D Game Design 4. SceneKit and 3D Game Design 5. GameplayKit 6. Exhibit the Metal in Your Game 7. Publishing Our iOS Game 8. The Future of iOS Game Development Index

The game loop

The game loop is a game developer's roadmap. The names differ depending on the framework and platform, but the same rules apply. The game loop comprises of all the methods, physics updates, and draw calls that occur during a single frame of your game and their order of execution. The golden rule to game development is to try to keep this loop always spinning in full iterations at no slower than 16.6 milliseconds, or 60 frames per second.

There are aspects of the game loop that don't have to be controlled by the game developer as much as they used to be in the past, though we do have the option to work down to the very GPU calls using OpenGL, or even better, Apple's Metal API. We will discuss more on these topics later on.

Here is what the SpriteKit game loop looks like:

The game loop

The preceding is an illustration given to us directly from the Apple Developer site. We see a number of functions that are called during a single frame. The first function iterated through is update...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime