Skip to main content

Day 96

About 2 minSwiftcrashcoursepaul-hudsonswifthacking-with-swiftxcodeappstore

Day 96 ๊ด€๋ จ


100 Days of Swift - Day 96

Project 29, part three

Project 29, part three

This game takes techniques youโ€™ve learned previously โ€“ not least SpriteKit, physics, and Core Graphics โ€“ and stitches them together into something new, something clever, and something fun.

This says a lot about the amount of progress youโ€™ve made: you ought to be able to go through every line of code in the project and explain what its purpose is, which would have been impossible a few months ago. But it also gets right to the heart of programming: itโ€™s a creative process - weโ€™re not just flipping bits in a CPU and hoping for the best, but using the skills weโ€™ve learned to design, to innovate, and to bring something new into the world.

Craig Federighi, senior vice president of software engineer at Apple, once said โ€œpeople sometimes have a view of programming that is something solitary and very technical, but programming is among the most creative, expressive, and social careers.โ€

As we approach the end of this course, I hope youโ€™ll keep those words in mind. As Iโ€™ve said countless times before: programming is an art, so donโ€™t spend all your time sharpening your pencil when you should be drawing.

Today you should work through the wrap up chapter for project 29, complete its review, then work through all three of its challenges.

Wrap up

Wrap up
100 Days of Swift - Day 96 - Wrap up

Wrap up

This was a huge project, and gave you lots to learn about mixing UIKit and SpriteKit, texture atlases, scene transitions, and of course destructible terrain โ€“ while also giving you another real-world project under your belt.

This project should also have shown you how you can bring skills together to make something bigger and better: Core Graphics and physics combined to make destructible terrain, and really it wasnโ€™t that hard!

Review what you learned

Anyone can sit through a tutorial, but it takes actual work to remember what was taught. Itโ€™s my job to make sure you take as much from these tutorials as possible, so Iโ€™ve prepared a short review to help you check your learning.

Click here to review what you learned in project 29.open in new window

Challenge

One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand whatโ€™s going on:

  1. Add code and UI to track the player scores across levels, then make the game end after one player has won three times.
  2. Add Auto Layout rules for the UI components in our storyboard, allowing them to remain positioned neatly regardless of which iPad size is used.
  3. Use the physics worldโ€™s gravity to add random wind to each level, making sure to add a label telling players the direction and strength.

Youโ€™ve completed another fun game built in SpriteKit โ€“ make a video and show it off!


์ด์ฐฌํฌ (MarkiiimarK)
Never Stop Learning.