What is a sprite sheet?


In computer graphics, a sprite sheet is defined as a bitmap image file made up of numerous smaller graphics that are integrated into a tiled grid formation. This combination of several graphics into one file allows you to utilize them in Anime and various other applications by simply loading a single file. This efficiency can really come in handy in situations where performance is particularly vital, e.g. game development.

To create a sprite sheet, you need to choose between any combination of bitmaps, graphic symbols, button symbols, and movie clips. Items can be selected either on the Stage or in the Library panel, but not both. Each frame and bitmap of the symbols you have selected will appear in the sprite sheet as an isolated graphic. Exporting from the Stage will preserve any transformations you have made to the symbol instance (skewing, scaling, and so on) at the image output.

Steps for creating a sprite sheet

  1. Choose one or more symbol instances on the Stage or symbols in the Library panel. You can also include bitmaps in the selection.
  2. Right click on the selection, and hit Generate Sprite Sheet.
  3. A dialog box will appear – click options, then select Export

Available export options

  • Image dimensions
  • This is the overall size of the sprite sheet in pixels. The default image dimension is usually set as autosize, which allows the sheet to work with any sprite you include.

  • Border padding
  • Padding, in pixels, around the sprite sheet’s edges

  • Image format
  • This describes the file format of the sprite sheet you’ve exported. PNG 32 bit and PNG 8-bit both allow the use of a transparent background, while JPG and PNG 24-bit are not compatible with transparent backgrounds. The difference between PNG 32-bit and PNG 8-bit in terms of visual graphics is relatively insignificant. But when it comes to size, PNG 32-bit files tend to be four times as big as PNG 8-bit files.

  • Algorithm
  • This is the technique used to pack graphics into the sprite sheet, and comes in two alternatives:

    • MaxRects
    • Basic (default)
  • Data format
  • This describes the internal format used to create image data, and is usually set as Starling as the default format. Choose the most suitable format for your desired workflow after exporting into the sprit

  • Rotate
  • This option rotates the sprites ninety degrees, and is only available in certain data formats.

  • Stack frames
  • This option prevents replica frames within the symbols you have selected from being reproduced in the subsequent sprite sheet.

  • Trim
  • This function cuts off unused pixels from every symbol frame included in the sprite sheet in order to save space.

Sprites have been occasionally used in movies for special effects. More specifically, in The Lord of the Rings: The Fellowship of the Ring, sprites were used to simulate fire coming out from the surface of the fire breathing Balrog demon. The term “sprite” may also be used to loosely describe any 2D image drawn on a computer, otherwise referred to as Pixel Art.