{"id":"c4bae95f-4236-4aff-98b7-fdc59f9f8300","shortId":"746bXT","kind":"skill","title":"spritekit","tagline":"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, bu","description":"# SpriteKit\n\nBuild 2D games and interactive animations for iOS 26+ using SpriteKit and\nSwift 6.3. Covers scene lifecycle, node hierarchy, actions, physics, particles,\ncamera, touch handling, and SwiftUI integration.\n\n## Contents\n\n- [Scene Setup](#scene-setup)\n- [Nodes and Sprites](#nodes-and-sprites)\n- [Actions and Animation](#actions-and-animation)\n- [Physics](#physics)\n- [Touch Handling](#touch-handling)\n- [Camera](#camera)\n- [Particle Effects](#particle-effects)\n- [SwiftUI Integration](#swiftui-integration)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n## Scene Setup\n\nSpriteKit renders content through `SKView`, which presents an `SKScene` -- the\nroot node of a tree that the framework animates and renders each frame.\n\n### Creating a Scene\n\nSubclass `SKScene` and override lifecycle methods. The coordinate system\norigin is at the bottom-left by default.\n\n```swift\nimport SpriteKit\n\nfinal class GameScene: SKScene {\n    override func didMove(to view: SKView) {\n        backgroundColor = .darkGray\n        physicsWorld.contactDelegate = self\n        physicsBody = SKPhysicsBody(edgeLoopFrom: frame)\n        setupNodes()\n    }\n\n    override func update(_ currentTime: TimeInterval) {\n        // Called once per frame before actions are evaluated.\n    }\n}\n```\n\n### Presenting a Scene (UIKit)\n\n```swift\nguard let skView = view as? SKView else { return }\nskView.ignoresSiblingOrder = true\n\nlet scene = GameScene(size: skView.bounds.size)\nscene.scaleMode = .resizeFill\nskView.presentScene(scene)\n```\n\n### Scale Modes\n\nUse `.resizeFill` when the scene should adapt to view size changes (rotation,\nmultitasking). Use `.aspectFill` for fixed-design game scenes. `.aspectFit`\nletterboxes; `.fill` stretches and may distort.\n\n### Frame Cycle\n\nEach frame follows this order:\n\n1. `update(_:)` -- game logic\n2. Evaluate actions\n3. `didEvaluateActions()` -- post-action logic\n4. Simulate physics\n5. `didSimulatePhysics()` -- post-physics adjustments\n6. Apply constraints\n7. `didApplyConstraints()`\n8. `didFinishUpdate()` -- final adjustments before rendering\n\nOverride only the callbacks where work is needed.\n\n## Nodes and Sprites\n\nUse `SKNode` (without a visual) as an invisible container or layout group.\nChild nodes inherit parent position, scale, rotation, alpha, and speed.\n`SKSpriteNode` is the primary visual node.\n\n### Common Node Types\n\n| Class | Purpose |\n|-------|---------|\n| `SKSpriteNode` | Textured image or solid color |\n| `SKLabelNode` | Text rendering |\n| `SKShapeNode` | Vector paths (expensive per draw call) |\n| `SKEmitterNode` | Particle effects |\n| `SKCameraNode` | Viewport control |\n| `SKTileMapNode` | Grid-based tiles |\n| `SKAudioNode` | Positional audio |\n| `SKCropNode` / `SKEffectNode` | Masking / CIFilter |\n| `SK3DNode` | Embedded SceneKit content |\n\n### Creating Sprites\n\n```swift\nlet player = SKSpriteNode(imageNamed: \"hero\")\nplayer.position = CGPoint(x: frame.midX, y: frame.midY)\nplayer.name = \"player\"\naddChild(player)\n```\n\n### Drawing Order\n\nSet `ignoresSiblingOrder = true` on `SKView` for better performance; SpriteKit\nthen uses `zPosition` to determine order. Without it, nodes draw in tree order.\n\n```swift\nbackground.zPosition = -1\nplayer.zPosition = 0\nforegroundUI.zPosition = 10\n```\n\n### Naming and Searching\n\nAssign `name` to find nodes without instance variables. Use `childNode(withName:)`,\n`enumerateChildNodes(withName:using:)`, or `subscript`. Patterns: `//` searches\nthe entire tree, `*` matches any characters, `..` refers to the parent.\n\n```swift\nplayer.name = \"player\"\nif let found = childNode(withName: \"player\") as? SKSpriteNode { /* ... */ }\n```\n\n## Actions and Animation\n\n`SKAction` objects define changes applied to nodes over time. Actions are\nimmutable and reusable. Run with `node.run(_:)`.\n\n### Basic Actions\n\n```swift\nlet moveUp = SKAction.moveBy(x: 0, y: 100, duration: 0.5)\nlet grow = SKAction.scale(to: 1.5, duration: 0.3)\nlet spin = SKAction.rotate(byAngle: .pi * 2, duration: 1.0)\nlet fadeOut = SKAction.fadeOut(withDuration: 0.3)\nlet remove = SKAction.removeFromParent()\n```\n\n### Combining Actions\n\n```swift\n// Sequential: run one after another\nlet dropAndRemove = SKAction.sequence([\n    SKAction.moveBy(x: 0, y: -500, duration: 1.0),\n    SKAction.removeFromParent()\n])\n\n// Parallel: run simultaneously\nlet scaleAndFade = SKAction.group([\n    SKAction.scale(to: 0.0, duration: 0.3),\n    SKAction.fadeOut(withDuration: 0.3)\n])\n\n// Repeat\nlet pulse = SKAction.repeatForever(\n    SKAction.sequence([\n        SKAction.scale(to: 1.2, duration: 0.5),\n        SKAction.scale(to: 1.0, duration: 0.5)\n    ])\n)\n```\n\n### Texture Animation\n\n```swift\nlet walkFrames = (1...8).map { SKTexture(imageNamed: \"walk_\\($0)\") }\nlet walkAction = SKAction.animate(with: walkFrames, timePerFrame: 0.1)\nplayer.run(SKAction.repeatForever(walkAction))\n```\n\nControl the speed curve with `timingMode` (`.linear`, `.easeIn`, `.easeOut`,\n`.easeInEaseOut`). Assign keys to actions for later access:\n\n```swift\nlet easeIn = SKAction.moveTo(x: 300, duration: 1.0)\neaseIn.timingMode = .easeInEaseOut\n\nplayer.run(pulse, withKey: \"pulse\")\nplayer.removeAction(forKey: \"pulse\") // stop later\n```\n\n## Physics\n\nSpriteKit provides a built-in 2D physics engine. The scene's `physicsWorld`\nmanages gravity and collision detection.\n\n### Adding Physics Bodies\n\n```swift\n// Circle body\nplayer.physicsBody = SKPhysicsBody(circleOfRadius: player.size.width / 2)\nplayer.physicsBody?.restitution = 0.3\n\n// Static rectangle\nground.physicsBody = SKPhysicsBody(rectangleOf: ground.size)\nground.physicsBody?.isDynamic = false\n\n// Texture-based body for irregular shapes\nplayer.physicsBody = SKPhysicsBody(texture: player.texture!, size: player.size)\n```\n\n### Category and Contact Masks\n\nUse bit masks to control collisions and contact callbacks:\n\n```swift\nstruct PhysicsCategory {\n    static let player:  UInt32 = 0b0001\n    static let enemy:   UInt32 = 0b0010\n    static let ground:  UInt32 = 0b0100\n}\n\nplayer.physicsBody?.categoryBitMask = PhysicsCategory.player\nplayer.physicsBody?.contactTestBitMask = PhysicsCategory.enemy\nplayer.physicsBody?.collisionBitMask = PhysicsCategory.ground\n```\n\n`categoryBitMask` identifies the body. `collisionBitMask` controls physics\nresponse (bouncing). `contactTestBitMask` triggers `didBegin`/`didEnd`.\n\n### Contact Detection\n\nImplement `SKPhysicsContactDelegate` and set `physicsWorld.contactDelegate = self`\nin `didMove(to:)`:\n\n```swift\nextension GameScene: SKPhysicsContactDelegate {\n    func didBegin(_ contact: SKPhysicsContact) {\n        let mask = contact.bodyA.categoryBitMask | contact.bodyB.categoryBitMask\n        if mask == PhysicsCategory.player | PhysicsCategory.enemy {\n            handlePlayerHit(contact)\n        }\n    }\n}\n```\n\n### Forces and Impulses\n\n```swift\nplayer.physicsBody?.applyForce(CGVector(dx: 0, dy: 50))      // continuous\nplayer.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 200))   // instant\nplayer.physicsBody?.applyAngularImpulse(0.5)                  // spin\n```\n\nUse `.applyImpulse` for jumps and projectile launches. Configure gravity with\n`physicsWorld.gravity = CGVector(dx: 0, dy: -9.8)` and per-body with\n`affectedByGravity`.\n\n## Touch Handling\n\n`SKScene` inherits from `UIResponder`. Override `touchesBegan`, `touchesMoved`,\n`touchesEnded` on the scene. Use `nodes(at:)` to hit-test.\n\n```swift\noverride func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {\n    guard let touch = touches.first else { return }\n    let location = touch.location(in: self)\n    let tappedNodes = nodes(at: location)\n\n    if tappedNodes.contains(where: { $0.name == \"playButton\" }) {\n        startGame()\n    }\n}\n```\n\nFor node-level touch handling, subclass the node and set\n`isUserInteractionEnabled = true`. That node then receives touches directly\ninstead of the scene.\n\n## Camera\n\n`SKCameraNode` controls the visible portion of the scene. Add it as a child\nand assign to `scene.camera`.\n\n```swift\nlet cameraNode = SKCameraNode()\naddChild(cameraNode)\ncamera = cameraNode\ncameraNode.position = CGPoint(x: frame.midX, y: frame.midY)\n```\n\n### Following a Character\n\nUpdate the camera position in `didSimulatePhysics()` or use constraints:\n\n```swift\noverride func didSimulatePhysics() {\n    cameraNode.position = player.position\n}\n\n// Constrain camera to world bounds\nlet xRange = SKRange(lowerLimit: frame.midX, upperLimit: worldWidth - frame.midX)\nlet yRange = SKRange(lowerLimit: frame.midY, upperLimit: worldHeight - frame.midY)\ncameraNode.constraints = [SKConstraint.positionX(xRange, y: yRange)]\n```\n\n### Camera Zoom and HUD\n\nScale the camera node inversely: `setScale(0.5)` zooms in 2x, `setScale(2.0)`\nzooms out 2x. Nodes added as children of the camera stay fixed on screen\n(HUD elements):\n\n```swift\nlet scoreLabel = SKLabelNode(text: \"Score: 0\")\nscoreLabel.position = CGPoint(x: 0, y: frame.height / 2 - 40)\nscoreLabel.fontName = \"AvenirNext-Bold\"\nscoreLabel.fontSize = 24\ncameraNode.addChild(scoreLabel)\n```\n\n## Particle Effects\n\n`SKEmitterNode` generates particle effects. Design emitters in Xcode's\nSpriteKit Particle File editor (`.sks`) or configure in code.\n\n```swift\n// Load from file\nguard let emitter = SKEmitterNode(fileNamed: \"Fire\") else { return }\nemitter.position = CGPoint(x: frame.midX, y: 100)\naddChild(emitter)\n```\n\n### One-Shot Emitters\n\nSet `numParticlesToEmit` for finite effects and remove after completion:\n\n```swift\nfunc spawnExplosion(at position: CGPoint) {\n    guard let explosion = SKEmitterNode(fileNamed: \"Explosion\") else { return }\n    explosion.position = position\n    explosion.numParticlesToEmit = 100\n    addChild(explosion)\n\n    let wait = SKAction.wait(forDuration: TimeInterval(explosion.particleLifetime))\n    explosion.run(SKAction.sequence([wait, .removeFromParent()]))\n}\n```\n\nSet `targetNode` to the scene so particles stay in world space when the\nemitter moves: `emitter.targetNode = self`.\n\n## SwiftUI Integration\n\n`SpriteView` embeds a SpriteKit scene in SwiftUI.\n\n```swift\nimport SwiftUI\nimport SpriteKit\n\nstruct GameView: View {\n    @State private var scene: GameScene = {\n        let s = GameScene()\n        s.size = CGSize(width: 390, height: 844)\n        s.scaleMode = .resizeFill\n        return s\n    }()\n\n    var body: some View {\n        SpriteView(scene: scene)\n            .ignoresSafeArea()\n    }\n}\n```\n\n### SpriteView Options\n\nPass `options: [.allowsTransparency]` for transparent backgrounds,\n`.shouldCullNonVisibleNodes` for offscreen culling, or `.ignoresSiblingOrder`\nfor `zPosition`-based draw order. Use `debugOptions: [.showsFPS, .showsNodeCount]`\nduring development.\n\n### Communicating Between SwiftUI and the Scene\n\nPass data through a shared `@Observable` object. Store the scene in `@State`\nto avoid re-creation on view re-renders:\n\n```swift\n@Observable final class GameState {\n    var score = 0\n    var isPaused = false\n}\n\nstruct GameContainerView: View {\n    @State private var gameState = GameState()\n    @State private var scene = GameScene()\n\n    var body: some View {\n        SpriteView(scene: scene, isPaused: gameState.isPaused)\n            .onAppear { scene.gameState = gameState }\n    }\n}\n```\n\n## Common Mistakes\n\n### Creating a new scene on every SwiftUI re-render\n\n```swift\n// DON'T: Scene is recreated on every body evaluation\nvar body: some View {\n    SpriteView(scene: GameScene(size: CGSize(width: 390, height: 844)))\n}\n\n// DO: Create once and reuse\n@State private var scene = GameScene(size: CGSize(width: 390, height: 844))\nvar body: some View {\n    SpriteView(scene: scene)\n}\n```\n\n### Adding a child node that already has a parent\n\nA node can only have one parent. Remove from the current parent first or\ncreate a separate instance. Adding a node that already has a parent crashes.\n\n### Forgetting to set contactTestBitMask\n\n```swift\n// DON'T: Bodies collide but didBegin is never called\nplayer.physicsBody?.categoryBitMask = PhysicsCategory.player\nenemy.physicsBody?.categoryBitMask = PhysicsCategory.enemy\n\n// DO: Set contactTestBitMask to receive contact callbacks\nplayer.physicsBody?.contactTestBitMask = PhysicsCategory.enemy\n```\n\n### Using SKShapeNode for performance-critical rendering\n\n`SKShapeNode` uses a separate draw call per instance. Prefer `SKSpriteNode`\nwith a texture for repeated elements to enable batched rendering.\n\n### Not removing nodes that leave the screen\n\n```swift\n// DON'T\nenemy.run(SKAction.moveBy(x: -800, y: 0, duration: 3.0))\naddChild(enemy)\n\n// DO: Remove after leaving the visible area\nenemy.run(SKAction.sequence([\n    SKAction.moveBy(x: -800, y: 0, duration: 3.0),\n    SKAction.removeFromParent()\n]))\naddChild(enemy)\n```\n\n### Setting physicsWorld.contactDelegate too late\n\nSet `physicsWorld.contactDelegate = self` in `didMove(to:)`, not in\n`update(_:)` or after a delay.\n\n## Review Checklist\n\n- [ ] Scene subclass overrides `didMove(to:)` for setup, not `init`\n- [ ] `scaleMode` chosen appropriately for the game's design\n- [ ] `ignoresSiblingOrder` set to `true` on `SKView` for performance\n- [ ] `zPosition` used consistently when `ignoresSiblingOrder` is enabled\n- [ ] Physics `contactDelegate` set in `didMove(to:)`\n- [ ] Category, collision, and contact bit masks configured correctly\n- [ ] `contactTestBitMask` set for any pair needing `didBegin`/`didEnd` callbacks\n- [ ] Static bodies use `isDynamic = false`\n- [ ] `SKShapeNode` avoided in performance-critical paths; `SKSpriteNode` preferred\n- [ ] Actions that move nodes offscreen include `.removeFromParent()` in sequence\n- [ ] One-shot emitters remove themselves after particle lifetime expires\n- [ ] Emitter `targetNode` set when particles should stay in world space\n- [ ] Scene stored in `@State` when used with `SpriteView` in SwiftUI\n- [ ] Texture atlases used for related sprites to reduce draw calls\n- [ ] `update(_:)` uses delta time for frame-rate-independent movement\n- [ ] Nodes removed from parent before being re-added elsewhere\n\n## References\n\n- See [references/spritekit-patterns.md](references/spritekit-patterns.md) for tile maps, texture atlases, shaders,\n  scene transitions, game loop patterns, audio, and SceneKit embedding.\n- [SpriteKit documentation](https://sosumi.ai/documentation/spritekit)\n- [SKScene](https://sosumi.ai/documentation/spritekit/skscene)\n- [SKSpriteNode](https://sosumi.ai/documentation/spritekit/skspritenode)\n- [SKAction](https://sosumi.ai/documentation/spritekit/skaction)\n- [SKPhysicsBody](https://sosumi.ai/documentation/spritekit/skphysicsbody)\n- [SKEmitterNode](https://sosumi.ai/documentation/spritekit/skemitternode)\n- [SKCameraNode](https://sosumi.ai/documentation/spritekit/skcameranode)\n- [SpriteView](https://sosumi.ai/documentation/spritekit/spriteview)\n- [SKTileMapNode](https://sosumi.ai/documentation/spritekit/sktilemapnode)","tags":["spritekit","swift","ios","skills","dpearson2699","accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills"],"capabilities":["skill","source-dpearson2699","skill-spritekit","topic-accessibility","topic-agent-skills","topic-ai-coding","topic-apple","topic-claude-code","topic-codex-skills","topic-cursor-skills","topic-ios","topic-ios-development","topic-liquid-glass","topic-localization","topic-mapkit"],"categories":["swift-ios-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dpearson2699/swift-ios-skills/spritekit","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add dpearson2699/swift-ios-skills","source_repo":"https://github.com/dpearson2699/swift-ios-skills","install_from":"skills.sh"}},"qualityScore":"0.684","qualityRationale":"deterministic score 0.68 from registry signals: · indexed on github topic:agent-skills · 468 github stars · SKILL.md body (14,725 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:53:44.689Z","embedding":null,"createdAt":"2026-04-18T22:01:17.713Z","updatedAt":"2026-04-22T00:53:44.689Z","lastSeenAt":"2026-04-22T00:53:44.689Z","tsv":"'-1':420 '-500':537 '-800':1412,1430 '-9.8':804 '/documentation/spritekit)':1618 '/documentation/spritekit/skaction)':1630 '/documentation/spritekit/skcameranode)':1642 '/documentation/spritekit/skemitternode)':1638 '/documentation/spritekit/skphysicsbody)':1634 '/documentation/spritekit/skscene)':1622 '/documentation/spritekit/skspritenode)':1626 '/documentation/spritekit/sktilemapnode)':1650 '/documentation/spritekit/spriteview)':1646 '0':422,494,535,581,773,781,802,999,1003,1219,1414,1432 '0.0':549 '0.1':588 '0.3':505,518,551,554,660 '0.5':498,564,569,787,971 '0.name':859 '0b0001':703 '0b0010':708 '0b0100':713 '1':261,575 '1.0':513,539,567,616 '1.2':562 '1.5':503 '10':424 '100':496,1053,1086 '2':265,511,657,1006 '2.0':976 '200':783 '24':1013 '26':48 '2d':3,41,635 '2x':974,979 '3':268 '3.0':1416,1434 '300':614 '390':1144,1280,1296 '4':274 '40':1007 '5':277 '50':775 '6':283 '6.3':53 '7':286 '8':288,576 '844':1146,1282,1298 'access':608 'action':59,81,85,197,267,272,467,479,488,523,605,1526 'actions-and-anim':84 'ad':18,647,981,1306,1333,1593 'adapt':232 'add':894 'addchild':392,907,1054,1087,1417,1436 'adjust':282,291 'affectedbygrav':810 'allowstranspar':1163 'alpha':324 'alreadi':1311,1337 'anim':6,22,45,83,87,139,469,571 'anoth':529 'appli':284,474 'applyangularimpuls':786 'applyforc':770 'applyimpuls':778,790 'appropri':1468 'area':1425 'aspectfil':240 'aspectfit':247 'assign':428,602,900 'atlas':1566,1603 'audio':367,1610 'avenirnext':1010 'avenirnext-bold':1009 'avoid':1203,1518 'background':1166 'background.zposition':419 'backgroundcolor':178 'base':363,672,1175 'basic':487 'batch':1397 'better':402 'bit':688,1499 'bodi':649,652,673,726,808,1152,1237,1268,1271,1300,1349,1513 'bold':1011 'bottom':161 'bottom-left':160 'bounc':731 'bound':939 'bu':38 'build':2,40 'built':633 'built-in':632 'byangl':509 'call':192,353,1355,1384,1574 'callback':297,695,1368,1511 'camera':62,95,96,885,909,922,936,961,967,986 'cameranod':905,908,910 'cameranode.addchild':1014 'cameranode.constraints':956 'cameranode.position':911,933 'categori':683,1495 'categorybitmask':715,723,1357,1360 'cgpoint':385,912,1001,1049,1074 'cgsize':1142,1278,1294 'cgvector':771,779,800 'chang':236,473 'charact':451,919 'checklist':113,116,1456 'child':317,898,1308 'childnod':437,462 'children':983 'chosen':1467 'cifilt':371 'circl':651 'circleofradius':655 'class':169,336,1215 'code':1035 'collid':1350 'collis':645,692,1496 'collisionbitmask':721,727 'color':343 'combin':522 'common':107,110,333,1248 'common-mistak':109 'communic':1184 'complet':1068 'configur':796,1033,1501 'consist':1484 'constrain':935 'constraint':285,928 'contact':31,685,694,736,753,764,1367,1498 'contact.bodya.categorybitmask':757 'contact.bodyb.categorybitmask':758 'contactdeleg':1490 'contacttestbitmask':718,732,1345,1364,1370,1503 'contain':313 'content':68,123,375 'continu':776 'control':359,592,691,728,887 'coordin':154 'correct':1502 'cover':54 'crash':1341 'creat':11,33,144,376,1250,1284,1329 'creation':1206 'critic':1377,1522 'cull':1170 'current':1325 'currenttim':190 'curv':595 'cycl':255 'darkgray':179 'data':1191 'debugopt':1179 'default':164 'defin':472 'delay':1454 'delta':1577 'design':244,1022,1473 'detect':32,646,737 'determin':409 'develop':1183 'didapplyconstraint':287 'didbegin':734,752,1352,1509 'didend':735,1510 'didevaluateact':269 'didfinishupd':289 'didmov':174,745,1446,1460,1493 'didsimulatephys':278,925,932 'direct':880 'distort':253 'document':1615 'draw':352,394,414,1176,1383,1573 'dropandremov':531 'durat':497,504,512,538,550,563,568,615,1415,1433 'dx':772,780,801 'dy':774,782,803 'easein':599,611 'easein.timingmode':617 'easeineaseout':601,618 'easeout':600 'edgeloopfrom':184 'editor':1030 'effect':35,98,101,356,1017,1021,1064 'element':992,1394 'els':211,844,1046,1081 'elsewher':1594 'emb':1119 'embed':373,1613 'emitt':1023,1042,1055,1059,1112,1538,1545 'emitter.position':1048 'emitter.targetnode':1114 'enabl':1396,1488 'enemi':706,1418,1437 'enemy.physicsbody':1359 'enemy.run':1409,1426 'engin':637 'entir':447 'enumeratechildnod':439 'evalu':199,266,1269 'event':838 'everi':1255,1267 'expens':350 'expir':1544 'explos':1077,1080,1088 'explosion.numparticlestoemit':1085 'explosion.particlelifetime':1094 'explosion.position':1083 'explosion.run':1095 'extens':748 'fadeout':515 'fals':669,1222,1516 'file':1029,1039 'filenam':1044,1079 'fill':249 'final':168,290,1214 'find':431 'finit':1063 'fire':1045 'first':1327 'fix':243,988 'fixed-design':242 'follow':258,917 'forc':765 'fordur':1092 'foregroundui.zposition':423 'forget':1342 'forkey':624 'found':461 'frame':143,185,195,254,257,1581 'frame-rate-independ':1580 'frame.height':1005 'frame.midx':387,914,944,947,1051 'frame.midy':389,916,952,955 'framework':138 'func':173,188,751,833,931,1070 'game':4,12,42,245,263,1471,1607 'gamecontainerview':1224 'gamescen':170,217,749,1137,1140,1235,1276,1292 'gamest':1216,1229,1230,1247 'gamestate.ispaused':1244 'gameview':1131 'generat':1019 'graviti':643,797 'grid':362 'grid-bas':361 'ground':711 'ground.physicsbody':663,667 'ground.size':666 'group':316 'grow':500 'guard':205,840,1040,1075 'handl':64,91,94,812,867 'handleplayerhit':763 'height':1145,1281,1297 'hero':383 'hierarchi':58 'hit':829 'hit-test':828 'hud':964,991 'identifi':724 'ignoressafearea':1158 'ignoressiblingord':397,1172,1474,1486 'imag':340 'imagenam':382,579 'immut':481 'implement':738 'import':166,1126,1128 'impuls':767 'includ':1531 'independ':1583 'inherit':319,814 'init':1465 'instanc':434,1332,1386 'instant':784 'instead':881 'integr':67,103,106,1117 'interact':44 'invers':969 'invis':312 'io':47 'irregular':675 'isdynam':668,1515 'ispaus':1221,1243 'isuserinteractionen':873 'jump':792 'key':603 'late':1441 'later':607,627 'launch':795 'layout':315 'leav':1403,1422 'left':162 'let':206,215,379,460,490,499,506,514,519,530,544,556,573,582,610,700,705,710,755,841,846,851,904,940,948,994,1041,1076,1089,1138 'letterbox':248 'level':865 'lifecycl':56,151 'lifetim':1543 'linear':598 'load':1037 'locat':847,855 'logic':264,273 'loop':1608 'lowerlimit':943,951 'manag':642 'map':577,1601 'mask':370,686,689,756,760,1500 'match':449 'may':252 'method':152 'mistak':108,111,1249 'mode':225 'move':1113,1528 'movement':1584 'moveup':491 'multitask':238 'name':425,429 'need':301,1508 'never':1354 'new':1252 'node':57,74,78,132,302,318,332,334,413,432,476,825,853,864,870,876,968,980,1309,1316,1335,1401,1529,1585 'node-level':863 'node.run':486 'nodes-and-sprit':77 'numparticlestoemit':1061 'object':471,1196 'observ':1195,1213 'offscreen':1169,1530 'onappear':1245 'one':527,1057,1320,1536 'one-shot':1056,1535 'option':1160,1162 'order':260,395,410,417,1177 'origin':156 'overrid':150,172,187,294,817,832,930,1459 'pair':1507 'parallel':541 'parent':320,455,1314,1321,1326,1340,1588 'particl':34,61,97,100,355,1016,1020,1028,1105,1542,1549 'particle-effect':99 'pass':1161,1190 'path':349,1523 'pattern':444,1609 'per':194,351,807,1385 'per-bodi':806 'perform':403,1376,1481,1521 'performance-crit':1375,1520 'physic':27,60,88,89,276,281,628,636,648,729,1489 'physicsbodi':182 'physicscategori':698 'physicscategory.enemy':719,762,1361,1371 'physicscategory.ground':722 'physicscategory.player':716,761,1358 'physicsworld':641 'physicsworld.contactdelegate':180,742,1439,1443 'physicsworld.gravity':799 'pi':510 'playbutton':860 'player':380,391,393,458,464,701 'player.name':390,457 'player.physicsbody':653,658,677,714,717,720,769,777,785,1356,1369 'player.position':384,934 'player.removeaction':623 'player.run':589,619 'player.size':682 'player.size.width':656 'player.texture':680 'player.zposition':421 'portion':890 'posit':321,366,923,1073,1084 'post':271,280 'post-act':270 'post-phys':279 'prefer':1387,1525 'present':127,200 'primari':330 'privat':1134,1227,1232,1289 'projectil':794 'provid':630 'puls':557,620,622,625 'purpos':337 'rate':1582 're':1205,1210,1258,1592 're-ad':1591 're-creat':1204 're-rend':1209,1257 'receiv':878,1366 'recreat':1265 'rectangl':662 'rectangleof':665 'reduc':1572 'refer':117,118,452,1595 'references/spritekit-patterns.md':1597,1598 'relat':1569 'remov':520,1066,1322,1400,1420,1539,1586 'removefrompar':1098,1532 'render':122,141,293,346,1211,1259,1378,1398 'repeat':555,1393 'resizefil':221,227,1148 'respons':730 'restitut':659 'return':212,845,1047,1082,1149 'reus':1287 'reusabl':483 'review':112,115,1455 'review-checklist':114 'root':131 'rotat':237,323 'run':484,526,542 's.scalemode':1147 's.size':1141 'scale':224,322,965 'scaleandfad':545 'scalemod':1466 'scene':13,55,69,72,119,146,202,216,223,230,246,639,823,884,893,1103,1122,1136,1156,1157,1189,1199,1234,1241,1242,1253,1263,1275,1291,1304,1305,1457,1555,1605 'scene-setup':71 'scene.camera':902 'scene.gamestate':1246 'scene.scalemode':220 'scenekit':374,1612 'score':998,1218 'scorelabel':995,1015 'scorelabel.fontname':1008 'scorelabel.fontsize':1012 'scorelabel.position':1000 'screen':990,1405 'search':427,445 'see':1596 'self':181,743,850,1115,1444 'separ':1331,1382 'sequenc':25,1534 'sequenti':525 'set':396,741,836,872,1060,1099,1344,1363,1438,1442,1475,1491,1504,1547 'setscal':970,975 'setup':70,73,120,1463 'setupnod':186 'shader':1604 'shape':676 'share':1194 'shot':1058,1537 'shouldcullnonvisiblenod':1167 'showsfp':1180 'showsnodecount':1181 'simul':26,275 'simultan':543 'size':218,235,681,1277,1293 'sk3dnode':372 'skaction':24,470,1627 'skaction.animate':584 'skaction.fadeout':516,552 'skaction.group':546 'skaction.moveby':492,533,1410,1428 'skaction.moveto':612 'skaction.removefromparent':521,540,1435 'skaction.repeatforever':558,590 'skaction.rotate':508 'skaction.scale':501,547,560,565 'skaction.sequence':532,559,1096,1427 'skaction.wait':1091 'skaudionod':365 'skcameranod':357,886,906,1639 'skconstraint.positionx':957 'skcropnod':368 'skeffectnod':369 'skemitternod':37,354,1018,1043,1078,1635 'skill' 'skill-spritekit' 'sklabelnod':344,996 'sknode':306 'skphysicsbodi':29,183,654,664,678,1631 'skphysicscontact':754 'skphysicscontactdeleg':739,750 'skrang':942,950 'sks':1031 'skscene':15,129,148,171,813,1619 'skshapenod':347,1373,1379,1517 'skspritenod':21,327,338,381,466,1388,1524,1623 'sktextur':578 'sktilemapnod':360,1647 'skview':17,125,177,207,210,400,1479 'skview.bounds.size':219 'skview.ignoressiblingorder':213 'skview.presentscene':222 'solid':342 'sosumi.ai':1617,1621,1625,1629,1633,1637,1641,1645,1649 'sosumi.ai/documentation/spritekit)':1616 'sosumi.ai/documentation/spritekit/skaction)':1628 'sosumi.ai/documentation/spritekit/skcameranode)':1640 'sosumi.ai/documentation/spritekit/skemitternode)':1636 'sosumi.ai/documentation/spritekit/skphysicsbody)':1632 'sosumi.ai/documentation/spritekit/skscene)':1620 'sosumi.ai/documentation/spritekit/skspritenode)':1624 'sosumi.ai/documentation/spritekit/sktilemapnode)':1648 'sosumi.ai/documentation/spritekit/spriteview)':1644 'source-dpearson2699' 'space':1109,1554 'spawnexplos':1071 'speed':326,594 'spin':507,788 'sprite':19,76,80,304,377,1570 'spritekit':1,8,39,50,121,167,404,629,1027,1121,1129,1614 'spriteview':1118,1155,1159,1240,1274,1303,1562,1643 'startgam':861 'state':1133,1201,1226,1231,1288,1558 'static':661,699,704,709,1512 'stay':987,1106,1551 'stop':626 'store':1197,1556 'stretch':250 'struct':697,1130,1223 'subclass':147,868,1458 'subscript':443 'swift':52,165,204,378,418,456,489,524,572,609,650,696,747,768,831,903,929,993,1036,1069,1125,1212,1260,1346,1406 'swiftui':66,102,105,1116,1124,1127,1186,1256,1564 'swiftui-integr':104 'system':155 'tappednod':852 'tappednodes.contains':857 'targetnod':1100,1546 'test':830 'text':345,997 'textur':339,570,671,679,1391,1565,1602 'texture-bas':670 'tile':364,1600 'time':478,1578 'timeinterv':191,1093 'timeperfram':587 'timingmod':597 'topic-accessibility' 'topic-agent-skills' 'topic-ai-coding' 'topic-apple' 'topic-claude-code' 'topic-codex-skills' 'topic-cursor-skills' 'topic-ios' 'topic-ios-development' 'topic-liquid-glass' 'topic-localization' 'topic-mapkit' 'touch':63,90,93,811,835,842,866,879 'touch-handl':92 'touch.location':848 'touches.first':843 'touchesbegan':818,834 'touchesend':820 'touchesmov':819 'transit':1606 'transpar':1165 'tree':135,416,448 'trigger':733 'true':214,398,874,1477 'type':335 'uievent':839 'uikit':203 'uint32':702,707,712 'uirespond':816 'updat':189,262,920,1450,1575 'upperlimit':945,953 'use':7,9,49,226,239,305,406,436,441,687,789,824,927,1178,1372,1380,1483,1514,1560,1567,1576 'var':1135,1151,1217,1220,1228,1233,1236,1270,1290,1299 'variabl':435 'vector':348 'view':176,208,234,1132,1154,1208,1225,1239,1273,1302 'viewport':358 'visibl':889,1424 'visual':309,331 'wait':1090,1097 'walk':580 'walkact':583,591 'walkfram':574,586 'width':1143,1279,1295 'withdur':517,553 'withkey':621 'withnam':438,440,463 'without':307,411,433 'work':299 'world':938,1108,1553 'worldheight':954 'worldwidth':946 'x':386,493,534,613,913,1002,1050,1411,1429 'xcode':1025 'xrang':941,958 'y':388,495,536,915,959,1004,1052,1413,1431 'yrang':949,960 'zoom':962,972,977 'zposit':407,1174,1482","prices":[{"id":"9ca17748-28fd-4adc-a876-0c6328c36e10","listingId":"c4bae95f-4236-4aff-98b7-fdc59f9f8300","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dpearson2699","category":"swift-ios-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:01:17.713Z"}],"sources":[{"listingId":"c4bae95f-4236-4aff-98b7-fdc59f9f8300","source":"github","sourceId":"dpearson2699/swift-ios-skills/spritekit","sourceUrl":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/spritekit","isPrimary":false,"firstSeenAt":"2026-04-18T22:01:17.713Z","lastSeenAt":"2026-04-22T00:53:44.689Z"}],"details":{"listingId":"c4bae95f-4236-4aff-98b7-fdc59f9f8300","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dpearson2699","slug":"spritekit","github":{"repo":"dpearson2699/swift-ios-skills","stars":468,"topics":["accessibility","agent-skills","ai-coding","apple","claude-code","codex-skills","cursor-skills","ios","ios-development","liquid-glass","localization","mapkit","networking","storekit","swift","swift-concurrency","swiftdata","swiftui","widgetkit","xcode"],"license":"other","html_url":"https://github.com/dpearson2699/swift-ios-skills","pushed_at":"2026-04-21T19:26:16Z","description":"Agent Skills for iOS 26+, Swift 6.3, SwiftUI, and modern Apple frameworks","skill_md_sha":"abe8a33cb9da70fad7c230042a2ec8dee424e8f0","skill_md_path":"skills/spritekit/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/spritekit"},"layout":"multi","source":"github","category":"swift-ios-skills","frontmatter":{"name":"spritekit","description":"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."},"skills_sh_url":"https://skills.sh/dpearson2699/swift-ios-skills/spritekit"},"updatedAt":"2026-04-22T00:53:44.689Z"}}