Cueing the Player to Pull the Plunger with Sprite Animations

When the game begins, the ball comes to rest on the plunger but nothing else happens. What kind of cue can we give to the player on how to launch it? For this example, we’re going to play an animated series of triangles moving down over the ball (think of a marquee) that gives a visual hint of what to do. See Figure 35, Frame-based animation cue to pull the plunger down for an example of each of the frames.

images/Polish/frame-based-animation-example.png
Figure 35. Frame-based animation cue to pull the plunger down

To implement this, you must learn about frame-based animations and texture atlases. Each image of the marching triangles ...

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.