Agent skill · software engineering · dpearson2699

spritekit

Build 2D games and animations using SpriteKit. Use when creating game scenes with SKScene and SKView, adding sprites with SKSpriteNode, animating with SKAction sequences, simulating physics with SKPhysicsBody and contact detection, creating particle effects with SKEmitterNode, building tile maps, using SKCameraNode, or integrating SpriteKit scenes in SwiftUI with SpriteView.

Why this skill is useful

Provides specific knowledge on SpriteKit's node hierarchy, physics simulation, and SwiftUI integration that the AI wouldn't reliably generate on its own.

What it needs

Requires xcode installed locally. About 7k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.

What this skill does

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. Presenting a Scene (UIKit) Scale Modes Use .resizeFill when the scene should adapt to view size changes (rotation, multitasking). Use .aspectFill for fixed-design game scenes. .aspectFit letterboxes; .fill stretches and may distort. Frame Cycle Each frame follows this order: 1. update(:) -- game logic 2. Evaluate actions 3. didEvaluateActions() -- post-action logic 4. Simulate physics 5. didSimulatePhysics() -- post-physics adjustments 6. Apply constraints 7. didApplyConstraints() 8. didFinishUpdate() -- final adjustments before rendering Override only the callbacks where work is needed. Nodes and Sprites Use SKNode (without a visual) as an invisible container or layout group. Child nodes inherit parent position, scale, rotation, alpha, and speed. SKSpriteNode is the primary visual node. Common Node Types Class Purpose ------- --------- SKSpriteNode Textured image or solid color SKLabelNode Text rendering SKShapeNode Vector paths (expensive per draw call) SKEmitterNode Particle effects SKCameraNode Viewport control SKTileMapNode Grid-based tiles SKAudioNode Positional audio SKCropNode / SKEffectNode Masking / CIFilter SK3DNode Embedded SceneKit content Creating Sprites Drawing Order Set ignoresSiblingOrder = true on SKView for better performance; SpriteKit then uses zPosition to determine order. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dpearson2699/spritekit

View the source on GitHub

Browse the @skills marketplace