Chapter 7More Physics: Paddles and Collisions

Our pinball game is starting to take shape, but there’s a lot more we need to add before it feels like the real thing. In the previous chapter, we worked out the basics of the physics world by building a ball, the player-controlled plunger, and a table edge body that the ball rolls around.

In this chapter, we’re going to build paddles as complex yet self-contained nodes combining physics bodies, joints, and forces. We’ll add bumpers and targets to the scene and keep score with a heads-up display. We’ll cover the ins and outs of physics body collision detection to add sound effects and animations. And we’ll finish with some special adjustments to the physics of the ball in real time to keep the ...

Get Build iOS Games with Sprite Kit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.