O'Reilly logo

Getting Started with SpriteKit by Jorge Jordán

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SKScene

The SKScene class is a subclass of SKNode that has some specific properties and methods to handle the way content is drawn in an SKView object (the screen).

The game loop

Each node provides content that will be animated and rendered by the scene in a process called game loop. It looks like the following screenshot that was taken from https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG:

The game loop

According to the preceding screenshot, each frame in a SpriteKit game is calculated in the following order:

  1. Firstly, the scene calls the update method. Here, we can specify the code that we want to execute just before ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required