Animation strips
In all of the other game projects in this book, our graphical resources have been confined to a single sprite sheet, onto which we have consolidated all of the images needed for our gameplay elements.
This works well for many small games, but it is certainly not the only way to organize your content. Since we are borrowing content from the XNA Platform Starter Kit, we will use it in the format it has been provided to us instead of creating new sprite sheets.
For each type of entity we will display in Gemstone Hunter, we have one or more PNG files containing multiple image frames for a single animation. For example, the Run.png
file for the main character from the Platform Starter Kit looks as follows:
Each frame is of the same size (48 x 48 pixels in this case), and the size of the image file itself determines the number of frames contained in the animation. The run animation is 480 pixels wide, at 48 pixels per frame, so there are 10 frames in the animation.