Monday, April 19, 2010

Basic Sprite Sheet Creator

The next program I would like to share is my sprite sheet creator. Using sprite sheets is, for the most part, pretty tedious especially to the new programmer. First, this sprite sheet creator is only meant for simple sprite sheets such as dice, loading animations or something similar to that. This post will just be an introduction with a brief introduction on how to use the tool with a screenshot, and latter I will explain step-by-step the code in the creator plus code that will take your sprite sheet and allow you to animate it in two different ways.

Screenshot of Sprite Tool

The Sprite Sheet can be separated into 8 different animations, more than that and I suggest using more than one sheet. To add a new animation click the browse button for animation 1, triple dot is browse. This will open the browse for files dialog, navigate to the directory with your images and select all the images that are for this animation so that you add all the images into your first animation. Repeat this until you have all the animations you want completed. Note make sure that your images are all the same size and that the first animation is the longest otherwise it will crash. Again just a basic tool nothing super fancy. After you do that you can opt to have a one pixel border, sometimes this will make the image look nicer. Next click the "Go" button, a save file dialog will appear asking you where to save it, simply browse to the desired directory and select a filename. A progress window will show the current process and status and when it is completed just close the window and you are done.

An example of a sprite sheet to act as a loading animation

Check back soon for a full breakdown of sprite sheet creator and its implementation into XNA.


  1. hi, ur tutorials are great ^^. But I faced a problem with the sprite tool. I get an error called:

    Parameter must be positive and < Height.
    Parameter name: y

    how to solve this problem...thx

    1. Click the "One pixel border" option.

  2. Hey man

    I've been searching around for ages for a program that does just this, all I've found were broken/expensive programs that give you more headaches than benefits. REALLY useful and insanely easy to use.


  3. Thank you very much! I was looking for something like that for all eternity (10-15 minutes actually). But still... Thanks.

  4. Thnx searching for 2 days!