Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dpearson2699/spritekit
Build 2D games and animations using SpriteKit.
Passed 20 of 24 test cases with the skill, and 18 of 24 without it.
and 1 more in the full report
3 fixed17 passed either way3 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
I'm building a 2D action game using SwiftUI and SpriteKit. Right now, my scene gets recreated every time my SwiftUI view re-renders, collision detection callbacks aren't triggering between my hero and hazards, and memory usage keeps climbing as nodes leave the viewport. Can you write a complete SwiftUI view and SKScene subclass implementation that solves these issues and follows recommended SpriteKit patterns?
| Checked | Without skill | With skill |
|---|---|---|
| The SwiftUI view stores the game scene in @State to preserve the instance across view re-renders. | Missed | Passed |
| The scene class configures contactTestBitMask on physics bodies to enable contact delegate callbacks. | Passed | Passed |
| Node position updates or contact handling defer scene tree mutations out of didBegin into update(_:) or a queue. | Missed | Passed |
| Offscreen movement actions or cleanup routines append removeFromParent() to release nodes leaving the viewport. | Passed | Passed |
The instructions your model reads when the skill loads.
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.
SpriteKit renders content through SKView, which presents an SKScene -- the
root node of a tree that the framework animates and renders each frame.
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()
}
test cases passed, vs 18 / 24 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.