FREE TRIAL: Accelerate your app development career with Hacking with Swift+! >>

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 Essential Developer

SPONSORED Join a FREE crash course for iOS devs who want to become complete senior developers — from October 18th to 24th. Learn how to apply iOS app architecture patterns through a series of lectures and practical coding sessions.

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.