When optimizing a game, you'll often want to remove nodes from the screen to improve performance. See how to remove nodes in this tutorial.
- [Instructor] In developing a game,…you're often going to want to remove nodes.…You're going to want to do this for two main reasons:…One could be that you're done using the node,…and it no longer needs to be on the screen.…Another reason is for performance.…In general, the more nodes on the screen,…the lower the performance is going to be.…So let's look at how we can remove nodes,…starting in the SpriteKit Scene editor.…Of course you could select a node.…So I have this drone selected.…And you could just press the delete key on the keyboard.…
You could also right click an object in the document outline…and choose Delete to delete in that way,…but let's look at how we can delete an object…using code as well.…So I have this drone that's named drone…that has player as its parent.…So in addition to parenting using the document outline,…you could also use this dropdown menu…and choose who the parent's going to be there.…So player is the parent, and that's its name as well.…So let's go over to GameScene.swift…and inside of here I'm going to create some variables…
- 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
Game Design Careers with Brenda Romerowith Brenda Romero54m 41s Beginner
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.