Bit masks are create using bit code and are used to control which objects collide with others and which collisions you want to handle in code. See how masks work in this tutorial.
- [Instructor] Now we get to the part…where we actually talk about applying binary…into our collision detections.…This is in regards to bit masks.…So, there are four different types of masks in SpriteKit:…category mask, collision mask,…a contact mask, and a field mask.…The category mask is the type of object,…so whether it's a player, an enemy, an item,…a hazard, et cetera.…
So each object is going to have one specific category.…The collision mask is going to be a list of categories…that the object will collide with.…Now, when I say collide,…I'm talking about physically collide,…two solid objects bumping into each other,…as opposed to objects going through each other.…Then we have the contact mask.…The contact mask tells us which objects are going…to trigger the contact delegate methods upon contact.…
For example,…if a laser bumps into an enemy,…then we want to know about it,…because we want to destroy the laser and the enemy,…or do something else.…So the contact mask might be different…from the collision mask,…because the contact mask regards objects that we care about.…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.