Video Tutorial: How To Make a Game Like Flappy Bird in Swift Part 6: Collision Detection

Learn how to use Sprite Kit’s built in physics engine to notify you when two things collide in your game. By Ray Wenderlich.

Leave a rating/review
Save for later
Share

Contents

Hide contents

Video Tutorial: How To Make a Game Like Flappy Bird in Swift Part 6: Collision Detection

1 min

Challenge

Your challenge is to:

  • Make it so when the user taps the screen in the “Showing Score” state, the app restarts
  • Do this by creating a new instance of MyScene, and presenting the new scene with a transition
  • Play the “pop” sound when you do this

Please Note: The artwork in this game is by Mike Berg at weheartgames.com. He’s a great guy, highly recommended btw! :] You have permission to use the code from this game in your own apps, but you do not have permission to use the artwork.

Download lecture slides

Download demo starter

Download demo finished

Download challenge finished

View next video: Keeping Score
View previous video: Physics Shapes

We’ve added a new feature to our newest videos, English subtitles! You can now click the ‘CC’ button in the video player bar to turn subtitles on or off.

Contributors

Over 300 content creators. Join our team.