Optimization is always important in game development. It can mean the difference between a game with potential and a great game. This tutorial gives advice on optimzing games in SpriteKit.
- [Instructor] So right now if I test the application…the player shoots lasers indefinitely.…I want to draw your attention to the node count…at the bottom right corner of the simulator.…So as the game runs, the nodes keep going up…and they never stop, as the node count goes up,…performance begins to go down over time.…You're going to notice a really big cutoff…when you start getting into having hundreds of nodes…on the screen, so we need to have some way…to manage these nodes.…
I'll stop the app, and we'll look at one way…that you can manage nodes.…What we're going to do here is just delete nodes after time.…You can actually find a way to recycle the nodes as well,…so you can use it multiple different ways…to manage your nodes and keep your node count lower.…So again, we're going to look at waiting…and then removing nodes over time.…So we'll head to debug area, head over to…GameScene.swift, and in the spawn laser method,…I'll go to the bottom and I'm going to create…a sequence of action.…
The first action is going to be a wait action.…
- Creating a SpriteKit project
- Adding and modifying sprites
- Creating sprites in code
- Transitioning between scenes
- Working with children and parents
- Adding physics
- Detecting and responding to collisions
- Applying particle effects
- Creating actions
- Working with sound
- Adding cameras and lights
Skill Level Intermediate
Careers in the Game Industrywith Christian Bradley1h 19m Beginner
Building a Game App with the Android SDKwith David Gassner2h 6m Intermediate
1. Introduction to SpriteKit
2. Add Physics
3. Work with Particle Effects
4. Work with Actions
5. Work with Audio
6. Additional Features
Next steps1m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.