Although these projects shouldn’t have been too difficult for someone at your level, they definitely covered some important skills that you’ll come back to time and time again.
You also completed the technique project all about debugging. Although I covered the main techniques in that chapter, debugging isn’t really something that can be taught – it’s a skill you acquire over time with experience. As you progress, you’ll learn to recognize certain kinds of errors as ones you’ve solved before, so over time you get faster and spotting - and fixing – mistakes.
Some other things you learned in this milestone are:
Timer
to trigger a repeating method every few seconds. Remember to call invalidate()
on your time when you want it to stop!advanceSimulationTime()
method to force a particle system to move forward a set number of seconds so that it looks like it has existed for a while.SKPhysicsBody(texture:)
initializer to get pixel-perfect physics. This is computationally expensive, so you should use it only when strictly needed.linearDamping
and angularDamping
properties of SKPhysicsBody
to force sprites to retain their speed and spin, rather than slowing down over time – project 23 was set in outer space, after all!assert()
function lets you ensure your app’s state is exactly what you thought it was.SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.