what’s new in spritekit - apple developer · framework features what is spritekit? 2d graphics...
TRANSCRIPT
![Page 1: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/1.jpg)
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
Graphics and Games #WWDC16
Session 610
What’s New in SpriteKit
Ross Dexter Games Technologies EngineerClément Boissière Games Technologies Engineer
![Page 2: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/2.jpg)
What Is SpriteKit?
![Page 3: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/3.jpg)
Framework featuresWhat Is SpriteKit?
2D graphics framework for gamesFlexible, easy to use, high-performanceSupported on iOS, macOS, tvOS & watchOS Automatic access to the latest updatesNatural integration with Swift
![Page 4: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/4.jpg)
Xcode-integrated live editorWhat Is SpriteKit?
Visually lay out your game scenesTimeline-based animationParticle editorAsset Catalog integrationTile map editingGameplayKit integration
![Page 5: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/5.jpg)
Built-in Metal supportWhat Is SpriteKit?
Automatically Metal-backedZero action required for developers
![Page 6: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/6.jpg)
![Page 7: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/7.jpg)
Scene Outline View
![Page 8: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/8.jpg)
Scene hierarchy at-a-glanceScene Outline View
The Jump Bar contains the scene hierarchy• Only allows for selection• Shows one branch at a time
![Page 9: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/9.jpg)
Scene hierarchy at-a-glanceScene Outline View
Scene Outline View shows the entire hierarchy• Select, rename, remove• Drag to parent/unparent• Can lock and/or hide nodes
NEW
![Page 10: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/10.jpg)
GameplayKit Integration
![Page 11: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/11.jpg)
Entities and componentsGameplayKit Integration
Design pattern focused on modularityComponents encapsulate behavior• Health• Collision• Player input
Write it once, assign to multiple objects
![Page 12: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/12.jpg)
Entities and componentsGameplayKit Integration NEW
Assign components directly from the editorProperties can be tweaked via the inspectorWe take care of the hard stuff for you
![Page 13: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/13.jpg)
PathfindingGameplayKit Integration
Pathfinding uses navigation graphsGraphs are collections of nodesNodes are joined by connectionsDescribes how to move through scene
![Page 14: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/14.jpg)
Navigation graph editorGameplayKit Integration
Create and edit navigation graphs• Add and remove nodes• Create or adjust connections
NEW
![Page 15: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/15.jpg)
FPS Performance Gauge
![Page 16: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/16.jpg)
Real-time performance breakdownFPS Performance Gauge
![Page 17: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/17.jpg)
Real-time performance breakdownFPS Performance Gauge
Frame rate
![Page 18: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/18.jpg)
Real-time performance breakdownFPS Performance Gauge
Frame rateGPU utilization
![Page 19: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/19.jpg)
Real-time performance breakdownFPS Performance Gauge
Frame rateGPU utilizationCPU/GPU frame time
![Page 20: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/20.jpg)
Real-time performance breakdownFPS Performance Gauge
Frame rateGPU utilizationCPU/GPU frame time
![Page 21: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/21.jpg)
Real-time performance breakdownFPS Performance Gauge
Breakdown of update loop• Render• Client update• Actions• Physics
Easy to identify bottlenecksAvailable on iOS and watchOS
NEW
![Page 22: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/22.jpg)
Real-time performance breakdownFPS Performance Gauge
Breakdown of update loop• Render• Client update• Actions• Physics
Easy to identify bottlenecksAvailable on iOS and watchOS
NEW
![Page 23: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/23.jpg)
Real-time performance breakdownFPS Performance Gauge
Breakdown of update loop• Render• Client update• Actions• Physics
Easy to identify bottlenecksAvailable on iOS and watchOS
NEW
![Page 24: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/24.jpg)
Tile Maps
![Page 25: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/25.jpg)
NEW
What are tile maps?Tile Maps
Tile maps are a grid of evenly spaced imagesUsed to build scenes from repeating imagesQuickly create large, detailed scenes
![Page 26: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/26.jpg)
NEW
What are tile maps?Tile Maps
Tile maps are a grid of evenly spaced imagesUsed to build scenes from repeating imagesQuickly create large, detailed scenes
![Page 27: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/27.jpg)
NEW
What are tile maps?Tile Maps
Tile maps are a grid of evenly spaced imagesUsed to build scenes from repeating imagesQuickly create large, detailed scenes
![Page 28: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/28.jpg)
Why use tile maps?Tile Maps
Could place individual images by handPros• Small images help keep overhead low• Can be rearranged
Cons• Tedious and time consuming• Clutters the scene with lots of nodes• Quickly becomes difficult to manage
![Page 29: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/29.jpg)
Why use tile maps?Tile Maps
Could place individual images by handPros• Small images help keep overhead low• Can be rearranged
Cons• Tedious and time consuming• Clutters the scene with lots of nodes• Quickly becomes difficult to manage
![Page 30: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/30.jpg)
Why use tile maps?Tile Maps
Could use static images for your scenesPros• Easy to place and manage• Doesn’t clutter the scene
Cons• Tweaks require changing your assets• Large images require more memory• Variety requires additional large assets
![Page 31: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/31.jpg)
Why use tile maps?Tile Maps
Tile maps get you the best of both solutions• Easy to manage• Can be quickly modified• Large scenes with low overhead
NEW
![Page 32: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/32.jpg)
Why use tile maps?Tile Maps
Tile maps get you the best of both solutions• Easy to manage• Can be quickly modified• Large scenes with low overhead
NEW
![Page 33: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/33.jpg)
Why use tile maps?Tile Maps
Great for lots of different games and art styles
NEW
![Page 34: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/34.jpg)
Why use tile maps?Tile Maps
Great for lots of different games and art styles• Top-down RPGs
NEW
![Page 35: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/35.jpg)
Why use tile maps?Tile Maps
Great for lots of different games and art styles• Top-down RPGs• Side-scrolling platformers
NEW
![Page 36: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/36.jpg)
Why use tile maps?Tile Maps
Great for lots of different games and art styles• Top-down RPGs• Side-scrolling platformers• Isometric city builders
NEW
![Page 37: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/37.jpg)
Why use tile maps?Tile Maps
Great for lots of different games and art styles• Top-down RPGs• Side-scrolling platformers• Isometric city builders• Hex-based board games
NEW
![Page 38: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/38.jpg)
DemoTile maps in action
![Page 39: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/39.jpg)
Class overviewTile Maps
SKTileMapNode
SKTileSet
SKTileGroup
SKTileGroupRule
SKTileDefinition
NEW
SKTileMapNode is the tile mapDerived from SKNodeContains all of the placed tiles Needs a tile set to be able to place tiles
![Page 40: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/40.jpg)
Class overviewTile Maps NEW
SKTileSet contains all placeable tile groupsAlso defines the type of tiles it contains• Grid• Isometric• Hexagonal
SKTileMapNode
SKTileSet
SKTileGroup
SKTileGroupRule
SKTileDefinition
![Page 41: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/41.jpg)
Class overviewTile Maps
SKTileGroup contains a set of related tiles• Grass• Water• Stone
Has rules that govern tile placement
NEW
SKTileMapNode
SKTileSet
SKTileGroup
SKTileGroupRule
SKTileDefinition
![Page 42: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/42.jpg)
Class overviewTile Maps NEW
SKTileMapNode
SKTileSet
SKTileGroup
SKTileGroupRule
SKTileDefinition
SKTileGroupRule controls how to interactContains tile variants
![Page 43: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/43.jpg)
Class overviewTile Maps
SKTileMapNode
SKTileSet
SKTileGroup
SKTileGroupRule
SKTileDefinition
NEW
SKTileDefinition defines tile appearanceAllows for animationImages can be flipped and/or rotated
![Page 44: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/44.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 45: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/45.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 46: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/46.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 47: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/47.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 48: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/48.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 49: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/49.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 50: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/50.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 51: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/51.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 52: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/52.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 53: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/53.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 54: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/54.jpg)
// Creating Tile Maps and Setting Tiles
// Get the tile set
guard let tileSet = SKTileSet(named: ”MyTileSet”) else { return }
// Create a tile map
let tileSize = CGSize(width: 32.0, height: 32.0)
let tileMap = SKTileMapNode(tileSet: tileSet, columns: 16, rows: 16, tileSize: tileSize)
// Get a tile group from the tile set
let tileGroup = tileSet.tileGroups.first
// Set tile group for a specific tile
tileMap.setTileGroup(tileGroup, forColumn: 4, row: 7)
// Fill the entire map with a tile group
tileMap.fill(with: tileGroup)
![Page 55: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/55.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 56: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/56.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 57: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/57.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 58: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/58.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 59: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/59.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 60: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/60.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 61: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/61.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 62: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/62.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 63: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/63.jpg)
// Check user data in the tile under the player’s sprite
// Convert the player’s position into the tile map’s frame of reference
let position = tileMap.convert(playerSprite.position, from: playerSprite)
// Get the column and row of the tile that contains the position
let column = tileMap.tileColumnIndex(fromPosition: position)
let row = tileMap.tileRowIndex(fromPosition: position)
// Get the tile definition in the tile the player’s sprite is over
guard let definition = tileMap.tileDefinition(atColumn: column, row: row) else { return }
// Access custom user data on the tile definition
let customUserData = definition.userData?.value(forKey: “MyKey”)
![Page 64: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/64.jpg)
Framework feature recapTile Maps
Tile maps get more out of your art budget• Fewer assets needed• Reduced memory overhead
Supports animation
NEW
![Page 65: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/65.jpg)
Framework feature recapTile Maps
Designed to be layered• Increased asset versatility• Enables effects
Great for different art styles and games
NEW
![Page 66: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/66.jpg)
Framework feature recapTile Maps NEW
Automatic subdivision• Only visible chunks are drawn
Batch renderingMultiple tile types• Grid• Isometric• Hexagonal
![Page 67: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/67.jpg)
Editor feature recapTile Maps
Editing tile maps is simple and easyAutomapping does the hard work for youCreate new tile sets visually
NEW
![Page 68: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/68.jpg)
Warp Transformation
Clément Boissière Games Technologies Engineer
![Page 69: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/69.jpg)
IntroductionWarp Transformation
![Page 70: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/70.jpg)
IntroductionWarp Transformation
Available transforms in SpriteKit
![Page 71: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/71.jpg)
IntroductionWarp Transformation
Available transforms in SpriteKit• Scale
![Page 72: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/72.jpg)
IntroductionWarp Transformation
Available transforms in SpriteKit• Scale• Rotation
![Page 73: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/73.jpg)
IntroductionWarp Transformation
Available transforms in SpriteKit• Scale• Rotation• Custom shader
![Page 74: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/74.jpg)
IntroductionWarp Transformation
SKWarpGeometry• Two grids of points defining the distortion• Source positions• Destination positions
NEW
![Page 75: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/75.jpg)
IntroductionWarp Transformation
SKWarpGeometry• Two grids of points defining the distortion• Source positions• Destination positions
NEW
![Page 76: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/76.jpg)
IntroductionWarp Transformation
SKWarpGeometry• Two grids of points defining the distortion• Source positions• Destination positions
NEW
![Page 77: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/77.jpg)
IntroductionWarp Transformation
SKWarpGeometry• Two grids of points defining the distortion• Source positions• Destination positions
NEW
![Page 78: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/78.jpg)
ExamplesWarp Transformation NEW
![Page 79: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/79.jpg)
ExamplesWarp Transformation
A few examples
NEW
![Page 80: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/80.jpg)
ExamplesWarp Transformation
A few examples• Squash
NEW
![Page 81: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/81.jpg)
ExamplesWarp Transformation
A few examples• Squash• Stretch
NEW
![Page 82: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/82.jpg)
ExamplesWarp Transformation
A few examples• Squash• Stretch• Keyframe-based animations
NEW
![Page 83: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/83.jpg)
How it worksWarp Transformation NEW
![Page 84: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/84.jpg)
How it worksWarp Transformation
Concept• A grid is an indexed set of points
NEW
0 1 2
3 4 5
6 7 8
![Page 85: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/85.jpg)
How it worksWarp Transformation
Concept• A grid is an indexed set of points• Each cell is a quad
NEW
0 1 2
3 4 5
6 7 8
![Page 86: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/86.jpg)
How it worksWarp Transformation
Concept• A grid is an indexed set of points• Each cell is a quad• Vertices change to create distortion
NEW
0 1 2
3 4 5
6 7 8
![Page 87: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/87.jpg)
How it worksWarp Transformation
Concept• A grid is an indexed set of points• Each cell is a quad• Vertices change to create distortion• Keep the same texture coordinates
NEW
0 1 2
3 4 5
6 7 8
![Page 88: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/88.jpg)
How it worksWarp Transformation
Concept• A grid is an indexed set of points• Each cell is a quad• Vertices change to create distortion• Keep the same texture coordinates• GPU interpolation
NEW
0 1 2
3 4 5
6 7 8
![Page 89: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/89.jpg)
How it worksWarp Transformation
Concept• A grid is an indexed set of points• Each cell is a quad• Vertices change to create distortion• Keep the same texture coordinates• GPU interpolation
NEW
![Page 90: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/90.jpg)
Warp Transformation NEW
![Page 91: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/91.jpg)
Warp Transformation NEW
![Page 92: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/92.jpg)
How it worksWarp Transformation
Higher level of details• More cells?
NEW
![Page 93: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/93.jpg)
How it worksWarp Transformation
Higher level of details• More cells?
NEW
![Page 94: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/94.jpg)
How it worksWarp Transformation NEW
![Page 95: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/95.jpg)
How it worksWarp Transformation
End result• Automatic quad subdivisions• High level of detail• Minimal quad count
NEW
![Page 96: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/96.jpg)
How it worksWarp Transformation
You can specify the max subdivision level• Adjust details level• Performance tuning
NEW
sd = 1 sd = 4
![Page 97: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/97.jpg)
// SKWarpGeometryGrid - 2x2 grid example.
// [0]---[1]---[2]
// | | |
// [3]---[4]---[5]
// | | |
// [6]---[7]---[8]
var src = [float2]()
var dst = [float2]()
let warpGrid = SKWarpGeometryGrid(columns: 2,
rows: 2,
sourcePositions: src,
destPositions: dst)
sprite.warpGeometry = warpGrid
sprite.subdivisionLevels = 3 // Optional, defaults to 2
NEW
![Page 98: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/98.jpg)
// SKWarpGeometryGrid - 2x2 grid example.
// [0]---[1]---[2]
// | | |
// [3]---[4]---[5]
// | | |
// [6]---[7]---[8]
var src = [float2]()
var dst = [float2]()
let warpGrid = SKWarpGeometryGrid(columns: 2,
rows: 2,
sourcePositions: src,
destPositions: dst)
sprite.warpGeometry = warpGrid
sprite.subdivisionLevels = 3 // Optional, defaults to 2
NEW
![Page 99: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/99.jpg)
// SKWarpGeometryGrid - 2x2 grid example.
// [0]---[1]---[2]
// | | |
// [3]---[4]---[5]
// | | |
// [6]---[7]---[8]
var src = [float2]()
var dst = [float2]()
let warpGrid = SKWarpGeometryGrid(columns: 2,
rows: 2,
sourcePositions: src,
destPositions: dst)
sprite.warpGeometry = warpGrid
sprite.subdivisionLevels = 3 // Optional, defaults to 2
NEW
![Page 100: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/100.jpg)
// SKWarpGeometryGrid - 2x2 grid example.
// [0]---[1]---[2]
// | | |
// [3]---[4]---[5]
// | | |
// [6]---[7]---[8]
var src = [float2]()
var dst = [float2]()
let warpGrid = SKWarpGeometryGrid(columns: 2,
rows: 2,
sourcePositions: src,
destPositions: dst)
sprite.warpGeometry = warpGrid
sprite.subdivisionLevels = 3 // Optional, defaults to 2
NEW
![Page 101: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/101.jpg)
// SKWarpGeometryGrid - 2x2 grid example.
// [0]---[1]---[2]
// | | |
// [3]---[4]---[5]
// | | |
// [6]---[7]---[8]
var src = [float2]()
var dst = [float2]()
let warpGrid = SKWarpGeometryGrid(columns: 2,
rows: 2,
sourcePositions: src,
destPositions: dst)
sprite.warpGeometry = warpGrid
sprite.subdivisionLevels = 3 // Optional, defaults to 2
NEW
![Page 102: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/102.jpg)
// New SKAction
let a1 = SKAction.warp(to: grid,
duration: 5.0)
let a2 = SKAction.animate(withWarps: [grid1, grid2, grid3],
times: [t1, t2, t3])
let a3 = SKAction.animate(withWarps: [grid1, grid2, grid3],
times: [t1, t2, t3],
restore: true)
NEW
![Page 103: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/103.jpg)
// New SKAction
let a1 = SKAction.warp(to: grid,
duration: 5.0)
let a2 = SKAction.animate(withWarps: [grid1, grid2, grid3],
times: [t1, t2, t3])
let a3 = SKAction.animate(withWarps: [grid1, grid2, grid3],
times: [t1, t2, t3],
restore: true)
NEW
![Page 104: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/104.jpg)
// New SKAction
let a1 = SKAction.warp(to: grid,
duration: 5.0)
let a2 = SKAction.animate(withWarps: [grid1, grid2, grid3],
times: [t1, t2, t3])
let a3 = SKAction.animate(withWarps: [grid1, grid2, grid3],
times: [t1, t2, t3],
restore: true)
NEW
![Page 105: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/105.jpg)
DemoWarp transformation
![Page 106: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/106.jpg)
Per-Node Attributes for Custom Shaders
![Page 107: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/107.jpg)
IntroductionPer-Node Attributes for Custom Shaders
Custom shaders in SpriteKit• SKShader (fragment shader)• Built-in shader symbols• SKUniform
![Page 108: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/108.jpg)
Game ideaPer-Node Attributes for Custom Shaders
![Page 109: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/109.jpg)
Game ideaPer-Node Attributes for Custom Shaders
![Page 110: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/110.jpg)
Game ideaPer-Node Attributes for Custom Shaders
![Page 111: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/111.jpg)
Game ideaPer-Node Attributes for Custom Shaders
![Page 112: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/112.jpg)
Game ideaPer-Node Attributes for Custom Shaders
![Page 113: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/113.jpg)
ExamplePer-Node Attributes for Custom Shaders
Shader UniformSprite
u_health
![Page 114: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/114.jpg)
ExamplePer-Node Attributes for Custom Shaders
u_health : float
low
0.2
half
0.5
full
1.0
![Page 115: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/115.jpg)
ExamplePer-Node Attributes for Custom Shaders
Shader1Sprite1 Uniform0.5
u_health
![Page 116: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/116.jpg)
ExamplePer-Node Attributes for Custom Shaders
Shader1Sprite1 Uniform0.50.5
u_health
![Page 117: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/117.jpg)
u_health
u_health
ExamplePer-Node Attributes for Custom Shaders
Shader2 UniformSprite20.2
Shader3 UniformSprite31.0
Shader1Sprite1 Uniform0.50.5
u_health
![Page 118: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/118.jpg)
u_health
u_health
ExamplePer-Node Attributes for Custom Shaders
Shader2 UniformSprite20.2
Shader3 UniformSprite31.0
Shader1Sprite1 Uniform0.50.5
u_health
![Page 119: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/119.jpg)
ExamplePer-Node Attributes for Custom Shaders
Shader
Sprite1
Sprite2
Sprite3
![Page 120: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/120.jpg)
a_health
a_health
a_health
a_health
Attribute
ExamplePer-Node Attributes for Custom Shaders
Shader
NEW
Sprite1
Sprite2
Sprite3
0.5
0.2
1.0
![Page 121: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/121.jpg)
// SKAttribute for Per-Node Customization
// 1) Create your attributes:
let attribute = SKAttribute(name: "a_health", type: .float)
// 2) Attach to a shader:
shader.attributes = [attribute]
// 3) Set attributes directly on compatible nodes:
sprite1.setValue(SKAttributeValue(float: 0.2), forAttributeNamed: "a_health")
sprite2.setValue(SKAttributeValue(float: 0.5), forAttributeNamed: "a_health")
sprite3.setValue(SKAttributeValue(float: 1.0), forAttributeNamed: "a_health")
![Page 122: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/122.jpg)
// SKAttribute for Per-Node Customization
// 1) Create your attributes:
let attribute = SKAttribute(name: "a_health", type: .float)
// 2) Attach to a shader:
shader.attributes = [attribute]
// 3) Set attributes directly on compatible nodes:
sprite1.setValue(SKAttributeValue(float: 0.2), forAttributeNamed: "a_health")
sprite2.setValue(SKAttributeValue(float: 0.5), forAttributeNamed: "a_health")
sprite3.setValue(SKAttributeValue(float: 1.0), forAttributeNamed: "a_health")
NEW
![Page 123: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/123.jpg)
// SKAttribute for Per-Node Customization
// 1) Create your attributes:
let attribute = SKAttribute(name: "a_health", type: .float)
// 2) Attach to a shader:
shader.attributes = [attribute]
// 3) Set attributes directly on compatible nodes:
sprite1.setValue(SKAttributeValue(float: 0.2), forAttributeNamed: "a_health")
sprite2.setValue(SKAttributeValue(float: 0.5), forAttributeNamed: "a_health")
sprite3.setValue(SKAttributeValue(float: 1.0), forAttributeNamed: "a_health")
NEW
![Page 124: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/124.jpg)
// SKAttribute for Per-Node Customization
// 1) Create your attributes:
let attribute = SKAttribute(name: "a_health", type: .float)
// 2) Attach to a shader:
shader.attributes = [attribute]
// 3) Set attributes directly on compatible nodes:
sprite1.setValue(SKAttributeValue(float: 0.2), forAttributeNamed: "a_health")
sprite2.setValue(SKAttributeValue(float: 0.5), forAttributeNamed: "a_health")
sprite3.setValue(SKAttributeValue(float: 1.0), forAttributeNamed: "a_health")
NEW
![Page 125: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/125.jpg)
Focus Interaction on Apple TV
![Page 126: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/126.jpg)
IntroductionFocus Interaction on Apple TV
![Page 127: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/127.jpg)
IntroductionFocus Interaction on Apple TV
Interaction on tvOS• Integrated with UIKit• Simple to use• Consistent user experience• Support a wide range of controllers
![Page 128: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/128.jpg)
SpriteKit integrationFocus Interaction on Apple TV
Now also integrated with SpriteKit!Use cases• Game menus• Entire game interaction• Less code!
NEW
![Page 129: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/129.jpg)
// Focus extended support for non-view items
public protocol UIFocusItem : UIFocusEnvironment NEW
![Page 130: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/130.jpg)
// Focus extended support for non-view items
public protocol UIFocusItem : UIFocusEnvironment
// SKNode now conforms to the UIFocusItem protocol
public class SKNode : UIResponder, NSCopying, NSCoding,
NEW
UIFocusItem
![Page 131: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/131.jpg)
// 1) Create a subclass
class MenuElementNode : SKSpriteNode {
// 2) Override canBecomeFocused
override func canBecomeFocused() -> Bool {
return true
}
}
NEW
![Page 132: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/132.jpg)
// 1) Create a subclass
class MenuElementNode : SKSpriteNode {
// 2) Override canBecomeFocused
override func canBecomeFocused() -> Bool {
return true
}
}
NEW
![Page 133: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/133.jpg)
// 1) Create a subclass
class MenuElementNode : SKSpriteNode {
// 2) Override canBecomeFocused
override func canBecomeFocused() -> Bool {
return true
}
}
NEW
![Page 134: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/134.jpg)
NEWclass GameScene : SKScene {
let menuItem = MenuElementNode()
override func sceneDidLoad() { // 3) Opt-in the node for focus interaction self.menuItem.isUserInteractionEnabled = true; }
// 4) Track focus updates on your SKView, SKScene // or any SKNode that would make sense for your app logic. override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { let prevItem = context.previouslyFocusedItem let nextItem = context.nextFocusedItem
if nextItem is MenuElementNode { // Run some SKAction } } }
![Page 135: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/135.jpg)
NEWclass GameScene : SKScene {
let menuItem = MenuElementNode()
override func sceneDidLoad() { // 3) Opt-in the node for focus interaction self.menuItem.isUserInteractionEnabled = true; }
// 4) Track focus updates on your SKView, SKScene // or any SKNode that would make sense for your app logic. override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { let prevItem = context.previouslyFocusedItem let nextItem = context.nextFocusedItem
if nextItem is MenuElementNode { // Run some SKAction } } }
![Page 136: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/136.jpg)
NEWclass GameScene : SKScene {
let menuItem = MenuElementNode()
override func sceneDidLoad() { // 3) Opt-in the node for focus interaction self.menuItem.isUserInteractionEnabled = true; }
// 4) Track focus updates on your SKView, SKScene // or any SKNode that would make sense for your app logic. override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { let prevItem = context.previouslyFocusedItem let nextItem = context.nextFocusedItem
if nextItem is MenuElementNode { // Run some SKAction } } }
![Page 137: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/137.jpg)
SpriteKit integrationFocus Interaction on Apple TV NEW
![Page 138: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/138.jpg)
SpriteKit on Apple Watch
![Page 139: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/139.jpg)
IntroductionSpriteKit on Apple Watch
SpriteKit now available for Apple Watch!• High-performance 2D graphics framework• Particles, actions, physics, animations• Scene and Particle Editors• Debugging tools
NEW
![Page 140: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/140.jpg)
IntroductionSpriteKit on Apple Watch
SpriteKit now available for Apple Watch!• High-performance 2D graphics framework• Particles, actions, physics, animations• Scene and Particle Editors• Debugging tools
NEW
![Page 141: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/141.jpg)
Getting startedSpriteKit on Apple Watch
SKView
![Page 142: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/142.jpg)
Getting startedSpriteKit on Apple Watch
SKView
SKScene
![Page 143: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/143.jpg)
Getting startedSpriteKit on Apple Watch
SKSpriteNode
SKLabelNode
SKEmitterNode
SKCropNode
SKShapeNode
SKTileMapNode
SKFieldNode
SKCameraNode
SKLightNode
SKView
SKScene
![Page 144: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/144.jpg)
Getting startedSpriteKit on Apple Watch
SKSpriteNode
SKLabelNode
SKEmitterNode
SKCropNode
SKShapeNode
SKTileMapNode
SKFieldNode
SKCameraNode
SKLightNode
SKScene
WKInterfaceSKScene
![Page 145: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/145.jpg)
![Page 146: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/146.jpg)
![Page 147: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/147.jpg)
![Page 148: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/148.jpg)
![Page 149: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/149.jpg)
![Page 150: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/150.jpg)
![Page 151: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/151.jpg)
![Page 152: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/152.jpg)
![Page 153: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/153.jpg)
![Page 154: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/154.jpg)
![Page 155: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/155.jpg)
![Page 156: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/156.jpg)
![Page 157: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/157.jpg)
![Page 158: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/158.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 159: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/159.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 160: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/160.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 161: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/161.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 162: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/162.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 163: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/163.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 164: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/164.jpg)
CompatibilitySpriteKit on Apple Watch
Audio playback SKAudioNode not supported SKAction playSoundFileNamed
Video playback SKVideoNode not supported WKInterfaceMovie
Visual effectsSKEffectNode using CoreImage Filter SKEffectNode using SKShader
NEW
![Page 165: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/165.jpg)
SpriteKit Best Practices
![Page 166: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/166.jpg)
Asset CatalogSpriteKit Tips & Tricks
![Page 167: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/167.jpg)
Asset CatalogSpriteKit Tips & Tricks
SpriteKit is fully integrated with Asset Catalog
![Page 168: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/168.jpg)
Asset CatalogSpriteKit Tips & Tricks
SpriteKit is fully integrated with Asset Catalog• Use sprite atlas for minimal draw calls
![Page 169: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/169.jpg)
Asset CatalogSpriteKit Tips & Tricks
SpriteKit is fully integrated with Asset Catalog• Use sprite atlas for minimal draw calls• Support assets of multiple size (1x, 2x, 3x)
![Page 170: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/170.jpg)
Asset CatalogSpriteKit Tips & Tricks
SpriteKit is fully integrated with Asset Catalog• Use sprite atlas for minimal draw calls• Support assets of multiple size (1x, 2x, 3x)• Support for On-Demand Resources (iOS, tvOS)
![Page 171: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/171.jpg)
Asset CatalogSpriteKit Tips & Tricks
SpriteKit is fully integrated with Asset Catalog• Use sprite atlas for minimal draw calls• Support assets of multiple size (1x, 2x, 3x)• Support for On-Demand Resources (iOS, tvOS)• Compiles necessary assets into runtime binary
![Page 172: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/172.jpg)
PerformanceSpriteKit Tips & Tricks NEW
![Page 173: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/173.jpg)
PerformanceSpriteKit Tips & Tricks
Performance tuning and battery life improvements
NEW
![Page 174: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/174.jpg)
PerformanceSpriteKit Tips & Tricks
Performance tuning and battery life improvements• SpriteKit now only renders when necessary
NEW
![Page 175: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/175.jpg)
PerformanceSpriteKit Tips & Tricks
Performance tuning and battery life improvements• SpriteKit now only renders when necessary• Additional ways to control the frame rate
NEW
![Page 176: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/176.jpg)
PerformanceSpriteKit Tips & Tricks
Performance tuning and battery life improvements• SpriteKit now only renders when necessary• Additional ways to control the frame rate
NEW
// Specify the desired FPS.
skView.preferredFramesPerSecond = 30
@objc public protocol SKViewDelegate : NSObjectProtocol {
// Dynamically control the render rate.
// - return YES to initiate an update and render for the target time.
// - return NO to skip update and render for this target time.
@objc public func view(_ view: SKView, shouldRenderAtTime time: TimeInterval) -> Bool
}
![Page 177: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/177.jpg)
PerformanceSpriteKit Tips & Tricks
Performance tuning and battery life improvements• SpriteKit now only renders when necessary• Additional ways to control the frame rate
NEW
// Specify the desired FPS.
skView.preferredFramesPerSecond = 30
@objc public protocol SKViewDelegate : NSObjectProtocol {
// Dynamically control the render rate.
// - return YES to initiate an update and render for the target time.
// - return NO to skip update and render for this target time.
@objc public func view(_ view: SKView, shouldRenderAtTime time: TimeInterval) -> Bool
}
![Page 178: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/178.jpg)
Summary
![Page 179: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/179.jpg)
Summary
What's New in SpriteKit
![Page 180: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/180.jpg)
Summary
What's New in SpriteKit• Scene Outline View
![Page 181: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/181.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration
![Page 182: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/182.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration• FPS Performance Gauge
![Page 183: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/183.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration• FPS Performance Gauge• Tile Maps
![Page 184: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/184.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration• FPS Performance Gauge• Tile Maps• Warp Transformation
![Page 185: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/185.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration• FPS Performance Gauge• Tile Maps• Warp Transformation• Per-Node Attributes for Custom Shaders
![Page 186: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/186.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration• FPS Performance Gauge• Tile Maps• Warp Transformation• Per-Node Attributes for Custom Shaders• Focus Interaction on Apple TV
![Page 187: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/187.jpg)
Summary
What's New in SpriteKit• Scene Outline View• GameplayKit Integration• FPS Performance Gauge• Tile Maps• Warp Transformation• Per-Node Attributes for Custom Shaders• Focus Interaction on Apple TV• SpriteKit on Apple Watch
![Page 188: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/188.jpg)
More Information
https://developer.apple.com/wwdc16/610
![Page 189: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/189.jpg)
Related Sessions
Go Live with ReplayKit Mission Tuesday 10:00AM
Focus Interaction on tvOS Mission Wednesday 4:00PM
Visual Debugging with Xcode Presidio Wednesday 4:00PM
Controlling Game Input for Apple TV Mission Wednesday 5:00PM
What’s New in GameplayKit Pacific Heights Thursday 9:00AM
Advances in SceneKit Rendering Mission Thursday 11:00AM
![Page 190: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/190.jpg)
Related Sessions
What’s New in Game Center Mission Friday 10:00AM
Game Technologies for Apple Watch Mission Friday 3:00PM
![Page 191: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/191.jpg)
Labs
Game Center Lab Graphics, Games, and Media Lab A Friday 12:00PM
SpriteKit Lab Graphics, Games, and Media Lab B Friday 12:00PM
watchOS Graphics and Games Lab Graphics, Games, and Media Lab B Friday 4:00PM
![Page 192: What’s New in SpriteKit - Apple Developer · Framework features What Is SpriteKit? 2D graphics framework for games Flexible, easy to use, high-performance Supported on iOS, macOS,](https://reader033.vdocuments.mx/reader033/viewer/2022042713/5faac435afe3092a417f965c/html5/thumbnails/192.jpg)