It’s time for another game project, but this time we’ll be doing something quite different: we won’t be using UIKit. Instead we’ll be using SpriteKit, which is Apple’s high-performance drawing toolkit that lets us build advanced 2D games with relative ease.
On one hand this means you’ll be learning a whole load of useful new skills, such as how to detect touches, how to add physics, and more. On the other hand, it can feel a bit disconcerting at first, because most of the UIKit knowledge you’ve accrued so far won’t come in use – you need to learn to adapt to the SpriteKit way of working.
This is where it becomes more important than ever to work hard. Here’s a quote from Michael Jordan, who knows more than his far share both about the importance of games and also the importance of hard work in the face of adversity:
“I’ve missed more than 9000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.”
Success is something you need to fight for. Hopefully today will feel more like fun than fighting, but don’t be surprised if you come back to project 12 with a fresh interest in getting back to UIKit!
Today you have three topics to work through, and you’ll learn about
SKPhysicsBody, and more.
Need help? Tweet me @twostraws!
SPONSORED Build a functional Twitter clone using APIs and SwiftUI with Stream's 7-part tutorial series. In just four days, learn how to create your own Twitter using Stream Chat, Algolia, 100ms, Mux, and RevenueCat.
Sponsor Hacking with Swift and reach the world's largest Swift community!
The 100 Days of Swift is a free collection of videos, tutorials, tests, and more to help you learn Swift faster. Click here to learn more, or watch the video below.
Link copied to your pasteboard.