SpriteKit

A fast, friendly engine for 2D games, with physics and animation built in.

Introduced
2013
WWDC13
Kind
Framework
Runs on
Get it from
iOS
7.0+
iPadOS
7.0+
Mac Catalyst
13.0+
macOS
10.9+
tvOS
9.0+
visionOS
1.0+
watchOS
10.0+
Works in Swift Playground ›

Overview

SpriteKit renders sprites, shapes, text and particles, and gives you physics, actions and scenes to build 2D games quickly. It's efficient on every Apple platform.

Drop a scene into SwiftUI with SpriteView, and try ideas out right away in Swift Playground.

Nodes and scenes

Sprites, shapes, labels and particles in a scene graph.

Physics

Bodies, joints, fields and collisions built in.

Actions

Move, fade, animate and sequence with one line.

SpriteView

Embed a scene in SwiftUI.

GameView.swift
import SpriteKit import SwiftUI final class BounceScene: SKScene { override func didMove(to view: SKView) { physicsBody = SKPhysicsBody(edgeLoopFrom: frame) let ball = SKShapeNode(circleOfRadius: 20) ball.fillColor = .orange ball.position = CGPoint(x: frame.midX, y: frame.maxY - 40) ball.physicsBody = SKPhysicsBody(circleOfRadius: 20) ball.physicsBody?.restitution = 0.8 addChild(ball) } } struct GameView: View { var body: some View { SpriteView(scene: BounceScene(size: CGSize(width: 400, height: 600))) } }

History

How it grew up.

2013

Introduced

Arrives with iOS 7 and OS X Mavericks.

2016

Apple Watch

SpriteKit comes to watchOS 3.

2020

SpriteView

Embed SpriteKit in SwiftUI.