
Spritekit
This is your reference when building 2D games with SpriteKit on iOS. It covers the full stack: scene lifecycle and node hierarchy, SKAction sequences for animation, physics bodies with collision masks and contact detection, particle effects, camera control, and touch handling. The guide includes the frame cycle order (update, actions, physics, constraints), explains when to use different scale modes, and shows how to wire up SwiftUI integration with SpriteView. It's comprehensive without being exhaustive, hitting the practical patterns like texture animation, force versus impulse, and bit mask collision filtering. If you're moving from UIKit animations to a real game loop or need to remember how SKPhysicsContactDelegate works, this gets you there quickly.
- skills.sh installs
- 3.3K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill spritekit --agent claude-codeInstalls into .claude/skills of the current project.
Files
SpriteKit
Build 2D games and interactive animations for iOS 26+ using SpriteKit and Swift 6.3. Covers scene lifecycle, node hierarchy, actions, physics, particles, camera, touch handling, and SwiftUI integration.
Contents
- Scene Setup
- Nodes and Sprites
- Actions and Animation
- Physics
- Touch Handling
- Camera
- Particle Effects
- SwiftUI Integration
- Common Mistakes
- Review Checklist
- References
Scene Setup
SpriteKit renders content through SKView, which presents an SKScene -- the
root node of a tree that the framework animates and renders each frame.
Creating a Scene
Subclass SKScene and override lifecycle methods. The coordinate system
origin is at the bottom-left by default.
import SpriteKit
final class GameScene: SKScene {
override func didMove(to view: SKView) {
backgroundColor = .darkGray
physicsWorld.contactDelegate = self
physicsBody = SKPhysicsBody(edgeLoopFrom: frame)
setupNodes()
}
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- DevOps & CI/CD, Mobile Development, Game Development
- First seen
- May 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Cryptokit3.3K
- Metrickit3.3K
- Pdfkit3.3K
- Gamekit3.3K
- Eventkit3.3K
- Musickit3.3K
- Swift Architecture3.3K
- Pencilkit3.3K
- Carplay3.2K
- Ios Simulator3.2K
- Scenekit3.2K
- Homekit3.2K
- Accessorysetupkit3.2K
- Callkit3.2K
- Cryptotokenkit3.2K
- Financekit3.2K
- Adattributionkit3.2K
- Paperkit3.2K
- Passkit3.2K
- Audioaccessorykit3.2K
- Dockkit3.2K
- Browserenginekit3.2K
- Appmigrationkit3.2K
- Relevancekit3.2K