FREE: Watch my new YouTube videos, Xcode in 20 Seconds! >>

< Previous: Special effects: SKEmitterNode   Next: Project 12 >

Wrap up

This project is done, and it's been a long one, but I hope you look at the results and think it was all worth it. Plus, you've once again learned a lot: SpriteKit, physics, blend modes, radians and CGFloat.

You’ve got the firm foundations of a real game here, but there's lots more you can do to make it even better. Here are some ideas to get you started:

  • The Content folder you copied in has other ball pictures rather than just ballRed. Generate a random number and choose ball colors randomly.
  • Right now, users can tap anywhere to have a ball created there, which makes the game too easy. Try to force the Y value of new balls so they are near the top of the screen.
  • Give players a limit of five balls, then remove obstacle boxes when they are hit. Can they clear all the pins with just five balls? You could make it so that landing on a green slot gets them an extra ball.
  • Make clicking on an obstacle box in editing mode remove it.

And if you were wondering how to get rid of the node and frames per second counts in your game, look inside the GameViewController.swift file for these two lines:

view.showsFPS = true
view.showsNodeCount = true

You did it! Now what?

You finished another project, and I'm glad Hacking with Swift helped you. Now I need your help. Please take just a moment out of your day to tell others about Hacking with Swift so they can benefit too.

You can click below to post a tweet straight to this project. Or if you're feeling particularly generous, you can click here to link to Hacking with Swift on your website and help spread the word.

Thank you. Your support is what keeps me going!


About the author

Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and Mario Kart world champion. OK, so that last part isn't true. If you're curious you can learn more here.

Upgrade to premium

The Hacking with Swift guide book helps you learn faster, plus get an Xcode tips and tricks video and Swift wall chart.

< Previous: Special effects: SKEmitterNode   Next: Project 12 >
Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let me know!

Click here to visit the Hacking with Swift store >>