About the Authors |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
|
PART I Introduction to Spritekit |
|
|
1 | (128) |
|
Chapter 1 Setting Up Your Game Scene and Adding Your First Sprites |
|
|
3 | (16) |
|
What You Need to Know and Have |
|
|
3 | (1) |
|
Introducing SuperSpaceMan |
|
|
3 | (1) |
|
Creating a Swift SpriteKit Project |
|
|
4 | (3) |
|
|
7 | (7) |
|
The GameViewController Class |
|
|
11 | (2) |
|
|
13 | (1) |
|
Adding a Background and Player Sprite |
|
|
14 | (4) |
|
|
18 | (1) |
|
Chapter 2 SpriteKit Scenes and SKNode Positioning |
|
|
19 | (14) |
|
|
19 | (1) |
|
The SKScene Rendering Loop |
|
|
20 | (2) |
|
Building the Scene's Node Tree |
|
|
22 | (5) |
|
|
24 | (2) |
|
|
26 | (1) |
|
Looking at SKSpriteNode Coordinates and Anchor Points |
|
|
27 | (5) |
|
|
28 | (2) |
|
|
30 | (2) |
|
|
32 | (1) |
|
Chapter 3 Adding Physics and Collision Detection to Your Game |
|
|
33 | (12) |
|
What Is an SKPhysicsBody? |
|
|
33 | (1) |
|
Adding Physics to Your Game World |
|
|
34 | (1) |
|
Applying Forces to SKPhysicsBody |
|
|
35 | (2) |
|
Adding Collision Detection to Your SKNode |
|
|
37 | (7) |
|
Adding a Node to Collide Into |
|
|
38 | (1) |
|
Adding Collision Detection |
|
|
38 | (1) |
|
Adding Bit Masks to Your SKPhysicsBody |
|
|
39 | (2) |
|
Removing the Orb When You Receive a Contact Message |
|
|
41 | (3) |
|
|
44 | (1) |
|
Chapter 4 Adding Scene Scrolling and Game Control |
|
|
45 | (10) |
|
Reorganizing the GameScene |
|
|
45 | (2) |
|
Adding More Orbs to the Scene |
|
|
47 | (3) |
|
|
50 | (2) |
|
Controlling Player Movement with the Accelerometer |
|
|
52 | (2) |
|
|
54 | (1) |
|
Chapter 5 Adding Actions and Animations |
|
|
55 | (16) |
|
Refactoring the Orb Node Layout One Last Time |
|
|
55 | (3) |
|
|
58 | (7) |
|
Using Actions to Move Nodes in the Scene |
|
|
59 | (4) |
|
Using SKActions to Animate Sprites |
|
|
63 | (2) |
|
Adding Some Additional Bling to the GameScene |
|
|
65 | (4) |
|
|
69 | (2) |
|
Chapter 6 Adding Particle Effects to Your Game with Emitter Nodes |
|
|
71 | (16) |
|
Using Particle Emitter Templates |
|
|
73 | (1) |
|
Creating a Particle Emitter |
|
|
73 | (3) |
|
Particle Emitter Properties |
|
|
76 | (6) |
|
The Particle Life-Cycle Properties |
|
|
78 | (1) |
|
The Lifetime Start and Range Properties |
|
|
79 | (1) |
|
The Particle Movement Properties |
|
|
79 | (3) |
|
Adding an Exhaust Trail to the Player |
|
|
82 | (4) |
|
|
86 | (1) |
|
Chapter 7 Adding Points and Sound |
|
|
87 | (16) |
|
|
87 | (8) |
|
Changing the Horizontal Alignment of the Label Node |
|
|
89 | (2) |
|
Changing the Vertical Alignment of the Label Node |
|
|
91 | (4) |
|
Adding Scoring to the Game |
|
|
95 | (2) |
|
Adding an Impulse Counter to the Game |
|
|
97 | (3) |
|
Adding Simple Sounds to the Game |
|
|
100 | (1) |
|
|
101 | (2) |
|
Chapter 8 Transitioning Between Scenes |
|
|
103 | (12) |
|
Pausing Scenes During a Transition |
|
|
104 | (1) |
|
Detecting When a New Scene Is Presented |
|
|
104 | (1) |
|
Adding a New Scene to SuperSpaceMan |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
109 | (4) |
|
|
113 | (2) |
|
Chapter 9 SpriteKit Best Practices |
|
|
115 | (14) |
|
Creating Your Own Nodes with Subclassing |
|
|
115 | (5) |
|
|
120 | (3) |
|
Externalizing Your Game Data |
|
|
123 | (2) |
|
Keeping Your Node Tree Pruned |
|
|
125 | (2) |
|
|
127 | (2) |
|
PART II Introduction to Scenekit |
|
|
129 | (74) |
|
Chapter 10 Creating Your First SceneKit Project |
|
|
131 | (12) |
|
|
131 | (3) |
|
|
132 | (1) |
|
|
133 | (1) |
|
Creating the SceneKit Project |
|
|
134 | (2) |
|
Wiring Up and Building a Scene |
|
|
136 | (6) |
|
|
136 | (2) |
|
|
138 | (1) |
|
|
138 | (4) |
|
|
142 | (1) |
|
Chapter 11 Scenes and Nodes |
|
|
143 | (14) |
|
|
143 | (2) |
|
SceneKit's Built-in Model Classes |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
146 | (9) |
|
|
155 | (2) |
|
Chapter 12 Lighting, Camera, and Material Effects in SceneKit |
|
|
157 | (10) |
|
|
157 | (2) |
|
|
159 | (2) |
|
|
161 | (3) |
|
Applying Materials to Your Obstacles |
|
|
164 | (2) |
|
|
166 | (1) |
|
Chapter 13 Render Loop, Physics, and Moving Around |
|
|
167 | (8) |
|
|
167 | (1) |
|
GameView: Moving the Hero |
|
|
168 | (3) |
|
Writing the Callback Delegate Function |
|
|
169 | (1) |
|
|
170 | (1) |
|
Introducing CoreMotion Framework |
|
|
171 | (2) |
|
|
173 | (2) |
|
Chapter 14 Collision Detection |
|
|
175 | (8) |
|
|
175 | (7) |
|
|
182 | (1) |
|
Chapter 15 SceneKit Interaction with SpriteKit |
|
|
183 | (8) |
|
|
183 | (2) |
|
Hooking Up the Controller to the Overlay |
|
|
185 | (2) |
|
|
187 | (2) |
|
|
189 | (2) |
|
Chapter 16 SceneKit Editor |
|
|
191 | (12) |
|
|
191 | (3) |
|
|
194 | (8) |
|
|
194 | (1) |
|
|
195 | (2) |
|
|
197 | (3) |
|
|
200 | (2) |
|
|
202 | (1) |
Index |
|
203 | |