Sprites
- To make a sprite--an image that
"does something"--we need a series of images
- The rotating skull uses 24 separate images
- The more images, the smoother the motion
- There are two ways to animate an individual image:
- Use an animated GIF
- This is a single data structure containing many images
- Advantage: Only need to load the one image
- Disadvantage: Your program can't control the speed
of the animation; it's built right into the GIF
- Use a series of GIFs or JPGs
- Load them all into an array and index into the array
to choose the one you want
- Advantage: You have full control
- Disadvantage: You have lots of separate files and
images