O'Reilly logo

Learning Objective-C by Developing iPhone Games by Amy M. Booker, Joseph D. Walters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a sprite sheet

When sprites were first being used for animation, a technique was created to reduce the time necessary to load and unload images from memory. Programmers (or artists) would create one large image with all of the images needed for that sprite. This became known as a sprite sheet.

In this next section, we are going to take a simple image and save it as two different images, flipping back and forth between the two to give the illusion of an animated bullet. This should give you a glimpse of how larger sprite sheets might work with something along the lines of character animation.

This is our bullet image file. To give the effect of animation, we will create one image of the left bullet and another image for the right bullet. Then, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required