Sprite Kit is a library that provides a high-performance animation and physics loop. It is well-suited for 2D game programming and is available on both iOS and OS X.
The animation loop:
The system restricts the animation loop to a maximum rate of 60Hz.
The visual aspect of the animation loop is determined by a scene-graph consisting of a hierarchy of SpriteKit.SKNodes. The root of the scene-graph is a SpriteKit.SKScene which itself is a SpiteKit.SKNode (see illustration below). SpriteKit.SKNodes can be rectangular, based on a CoreGraphics.CGPath, or display text. SpriteKit.SKNodes can be textured, colored, or display video. They can have CoreImage.CoreFilters applied to them and can be composited.
SpriteKit.SKNodes can have an associated SpriteKit.SKPhysicsBody. All of the SpriteKit.SKPhysicsBodys in the SpriteKit.SKScene.PhysicsWorld of the SpriteKit.SKScene are part of the physics loop. SpriteKitSKPhysicsBodys are joined to each other with SpriteKit.SKJoints, of which there are several sub-classes as shown in the following illustration.
Type | Reason |
---|---|
ISKPhysicsContactDelegate | Interface representing the required methods (if any) of the protocol SpriteKit.SKPhysicsContactDelegate. |
ISKSceneDelegate | Interface representing the required methods (if any) of the protocol SpriteKit.SKSceneDelegate. |
SK3DNode | Renders a Scene Kit image as a textured 2D image. Used to incorporate Scene Kit content into a Sprite Kit app. |
SKAction | Modifies properties on a SpriteKit.SKNode, often animating the changes. Sometimes reversible. |
SKActionDurationHandler | The delegate for a custom action, used with SpriteKit.SKAction.CustomActionWithDuration. |
SKActionTimingFunction | A method that maps time, a value between 0 and 1, to a return value between 0 snd 1. |
SKActionTimingMode | An enumeration whose values specify the time-varying behavior of a SpriteKit.SKAction. Used with SpriteKit.SKAction.TimingMode. |
SKBlendMode | An enumeration whose values specify options for blending of visual SpriteKit.SKNodes or particles. |
SKConstraint | Mathematical constraint on a node's position or orientation. |
SKCropNode | A node that masks its children's pixels. |
SKEffectNode | An SpriteKit.SKNode that applies a Core Graphics CoreImage.CIFilter to its output. |
SKEmitterNode | A SpriteKit.SKNode that produces colored and textured particles. |
SKFieldForceEvaluator | A method that derives a force by applying the physics of a field to a body that is within the field. |
SKFieldNode | Applies physics effects within a portion of a scene. |
SKInterpolationMode | An enumeration whose values specify the interpolation mode of a SpriteKit.SKKeyframeSequence. |
SKKeyframeSequence | An object that can control the properties of particles emitted by a SpriteKit.SKEmitterNode. |
SKLabelHorizontalAlignmentMode | An enumeration whose values specify horizontal alignment of a SpriteKit.SKLabelNode. Used with SpriteKit.SKLabelNode.HorizontalAlignmentMode |
SKLabelNode | A SpriteKit.SKNode that displays a string. |
SKLabelVerticalAlignmentMode | An enumeration whose values specify vertical alignment of a SpriteKit.SKLabelNode. Used with SpriteKit.SKLabelNode.VerticalAlignmentMode |
SKLightNode | A node that creates a lighting effect within a scene. |
SKMutableTexture | A texture that can be modified after assignment. |
SKNode | The building block out of which scene-graphs are made. The root of the tree is an SpriteKit.SKScene. |
SKNodeChildEnumeratorHandler | The delegate that acts as the enumeration handler for SpriteKit.SKNode.EnumerateChildNodes. |
SKNodeTouches_UITouch | Extension methods for UIKit.UITouch that aide with conversion to Sprite Kit coordinates. |
SKPhysicsBody | An object that reacts to the physics simulation of the SpriteKit.SKScene's SpriteKit.SKScene.PhysicsWorld. |
SKPhysicsContact | Encapsulates the data of a collision between two SpriteKit.SKPhysicsBodys. |
SKPhysicsContactDelegate | A delegate object for SpriteKit.SKPhysicsWorld that provides events when SpriteKit.SKPhysicsBodys begin and end contact with each other. |
SKPhysicsContactDelegate_Extensions | Extension methods to the SpriteKit.ISKPhysicsContactDelegate interface to support all the methods from the SpriteKit.SKPhysicsContactDelegate protocol. |
SKPhysicsJoint | Base class for subtypes that join bodies in the physics engine. |
SKPhysicsJointFixed | A SpriteKit.SKPhysicsJoint that rigidly connects two bodies. |
SKPhysicsJointLimit | A SpriteKit.SKPhysicsJoint that connects two bodies as if by a rope. |
SKPhysicsJointPin | A SpriteKit.SKPhysicsJoint that pins two bodies to a common point. |
SKPhysicsJointSliding | A SpriteKit.SKPhysicsJoint that connects two bodies as if by a sliding rod. |
SKPhysicsJointSpring | A SpriteKit.SKPhysicsJoint that connects two bodies as if by a spring. |
SKPhysicsWorld | Manages the physics for a SpriteKit.SKScene. |
SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler | The delegate used for enumerating bodies that fall along a ray when used with SpriteKit.SKPhysicsWorld.EnumerateBodies(). |
SKPhysicsWorldBodiesEnumeratorHandler | The delegate used to enumerate SpriteKit.SKPhysicsBodys with SpriteKit.SKPhysicsWorld.EnumerateBodies() and SpriteKit.SKPhysicsWorld.EnumerateBodies() |
SKRange | Defines a range for acceptable float values. |
SKReachConstraints | A range of motion used with inverse kinematics. |
SKRegion | A path-defined area. Typically used for hit-testing and physics-field extents. |
SKRepeatMode | An enumeration whose values specify whether the time value of a SpriteKit.SKKeyframeSequence should cycle. |
SKScene | A scene of content in Sprite Kit. The root of a tree of Sprite Kit nodes. |
SKSceneDelegate | Delegate object for SKScene objects. Provides methods relating to animation events. |
SKSceneDelegate_Extensions | Extension methods to the SpriteKit.ISKSceneDelegate interface to support all the methods from the SpriteKit.SKSceneDelegate protocol. |
SKSceneScaleMode | An enumeration whose values specify the way in which a SpriteKit.SKScene scales to the view in which it is being displayed. |
SKShader | An OpenGL ES fragment shader. |
SKShapeNode | A SpriteKit.SKShapeNode defined by a Core Graphics CoreGraphics.CGPath. |
SKSpriteNode | A SpriteKit.SKShapeNode that displays a textured, colored sprite. |
SKTexture | An image that can be used with one or more SpriteKit.SKSpriteNodes and particles. |
SKTextureAtlas | A collection of SpriteKit.SKTextures that are loaded from a single source. |
SKTextureFilteringMode | An enumeration whose values specify how a SpriteKit.SKTexture is rendered on a SpriteKit.SKSpriteNode of a different size. |
SKTextureModify | A method that modifies a texture in place. |
SKTransition | Transitions that can be used between SpriteKit.SKScenes. Used with the SpriteKit.SKView.PresentScene(SpriteKit.SKScene, SpriteKit.SKTransition) method. |
SKTransitionDirection | An enumeration of directions for use with SpriteKit.SKTransitions. |
SKUniform | Holds shareable uniform data for SKShader objects. |
SKUniformType | Contains values that describe the data with which an SpriteKit.SKUniform was initialized. |
SKVideoNode | A SpriteKit.SKNode that displays video. |
SKView | A UIKit.UIView that displays a SpriteKit.SKScene. |
SKView+SKViewAppearance | Appearance class for objects of type SpriteKit.SKView. |