Create Your First SpriteKit Scene
Before building your first scene, let’s go over the key components that make up a SpriteKit scene:
-
SKView: This is the primary view for a SpriteKit scene. The SKView class inherits from the UIView class (or NSView on macOS).
-
SKScene: This is the root node of the scene. The SKScene class includes properties and methods that define how to render content and process animation.
Typically, the view is responsible for presenting the scene.
You can create a scene in two ways: visually using the Scene Editor or programmatically in code using the Source Editor. For this first game, you’ll use code and the Source Editor to get better acquainted with what’s going on under the hood of SpriteKit.
Open the GameViewController.swift ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access