# Sprite Importer

The Sprite Importer allows you to convert PICT files into Ares sprites.

### Preparing the Source Image

The source PICT file must be a 256 (8 bit) color image which uses the Ares color table. In a nutshell, each frame of the sprite must be laid out in adjacent squares on an imaginary grid, from left to right, then from top to bottom, each square being the same size. The image must contain nothing but the sprite graphic and a solid color background which is any color but black, white, bright red, or any color which is in the sprite graphic itself. If the sprite is designed to rotate, the source image must rotate clockwise.The details of these requirements are explained below.

#### The Ares Color Table

These are the only 256 colors allowed for use in sprites.

You can use a program like Photoshop, Debabelizer, or the shareware GraphicConverter (www.graphicconverter.net) to convert your source image from 16 or 24 bit to 8-bit using the required Ares colors.

For example, here's how to convert your image to Ares' color table with GraphicConverter:

> 1. Open the source image.

> 2. If the image is already 8-bit but not using Ares' color table, select Picture->Colors->Change to 32768 Colors.

> 3. Select Picture->Colors->Options

> 4. When the Options for Color Reduction dialog box comes up, check the Use Custom Color Table option, then click the Open... button.

> 5. Select the Ares Color Table file included with Hera.

> 6. Make sure the Dither option is not checked.

> 7. Click OK

> 8. Select Picture->Colors->Change to 256 Colors.

> 9. Save the image under a different name (like "my sprite 8-bit.pct") in case there was a problem.

#### Laying the Sprite Frames in a Grid

Each frame of the sprite must be laid out in an imaginary grid in the source image. The grid can have multiple rows and columns.

There can be no graphics in the source image except the desired sprite against a solid background. The grid lines in the Sprite Importer are added by Hera for clarity.

wrong -- the source image contains visible grid lines

The cells of the grid must be square (having the same height and width). There can be no unused border space in the source image -- that is, the size of the image should be evenly divisible by the size of the imaginary grid.

wrong -- the source image is too wide (the last cell has extra space on the right)

The position of the graphic in the imaginary grid square is important, especially for rotating objects (like most ships). Sprites are drawn relative to their center point. The center point is taken from the position of the source graphic in the imaginary grid square.

right -- there are no grid lines or extraneous graphics, and the source image is the correct size; in this case, the grid squares are 28 x 28 pixels, and the source image is 196 pixels wide (28 x 7 frames)

#### Solid Color Background

When Hera creates the sprite, it uses the upper right corner of the source graphic to determine what the background color of the source image is. Then, every pixel in the source image which is not that exact color is considered to be a solid part of the sprite.

It is essential that you ensure that the background color is a pure solid color among the legal 253 colors (all of Ares colors except black, white, or 100% red). Pure green and pure blue are good choices.

wrong -- the background color was not among Ares' colors, so the graphic program dithered the background

right -- the pure green background did not dither

### Importing the Sprite

Once you have created a source image, importing it is easy.

The Sprite Importer can only be accessed from the Sprite Selector, which in turn can only be accessed by the Object Editor for rotating and self-animating objects.

Clicking on the Add... button in the Sprite Selector allows you to choose a source file.

After you choose the source file, the graphic is opened in the Sprite Importer window. If the graphic is too large, it may appear scaled down -- this will not affect the actual size of the sprite. The image shown is only for reference.

#### # of Columns

Enter the number of columns in the imaginary grid. This determines the size of the grid squares. For example, if your grid squares were 60 by 60 pixels, and your image was 600 pixels wide, you'd enter 10.

#### Total # of Cells

Enter the total number of sprite frames, or cells of the imaginary grid, you want to use. For example, if you had 24 frames of animation and 60 by 60 pixel grid squares, and your image was 600 pixels, or 10 cells wide, you'd have several unused cells. Unused cells will appear with a red X in them.

Once you've entered the correct values in the two fields, press the OK button.