TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

DAY 95

Project 29, part two

Today we’ll be completing our SpriteKit game, and I think you’ll be pleased by the end result. However to get to the end we’ll need to do a little mathematics: we need to convert between degrees and radians, and we need to calculator a vector from an angle and a speed.

I realize that for some reading this it has been a while since you studied mathematics at school, but if you stick with it I hope everything will become clear. As Ernest Rutherford once said, “all of physics is either impossible or trivial: it is impossible until you understand it, and then it becomes trivial.”

What’s more, I think the same is true of programming – today is day 95 of your learning journey, but if I’d talked to you about collision bitmasks, @IBAction, and Core Graphics back when you first started learning you wouldn’t have understood a word of it. Now these things are slowly becoming second nature for you: bitmasks let us define what each of our objects are and what they should bounce off, @IBAction marks a method being called when a user interface event happens, and Core Graphics lets us render images dynamically.

That’s another fantastic measure of how much progress you’ve made, and you’re not even done yet – keep going!

Today you have two topics to work through, and you’ll learn how to make texture atlases, how to simplify collision detection, how to transition between scenes, and more.

Need help? Tweet me @twostraws!


Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

100 Days of Swift

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.

Back to 100 Days of Swift

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.