# Sprite Manager

Contents
Startup
Sprite Collection
Graphics Data
Sprite Data
Sprite base data
Sprite Action and Animation
Export

The sprite manager enables you to collect different animation sequences of images to an action and a direction under the hood of labeling it "sprite".

The field of control is similar to the tile manager:

Sprite Manager

The Screen is divided (again) into 4 sections:

1. Top
   In the top section the tile management stuff is shown. SpriteSets can be loaded saved and divided into classes.

2. Left Side
   On the left side you can see the current loaded SpriteSet displayed with the corresponding graphics. You can select the images using the mouse button.

3. Middle Top
   Here you can set a graphic for your srpite(s). Input for the graphic is an ImageCollection.

4. Middle Bottom
   Here you can enter all information you might associate with sprites. Like a name, ID, height and width restrictions, descriptions, a set of attributes etc.
   Not done yet: Tile attributes.

## File

What is "File"? A SpriteSet is saved to a simple (xml) file, which includes all information about the SpriteSet. The ". . ."-Button opens a file dialog do open a SpriteSet. To save to a new SpriteSet you MUST enter a filename. Some operations to are only possible if a filename (and a class) is given.

## Class (es)

Each SrpiteSet can (must) be divided (at least one) into classes. All classes and all information in those classes are saved into one (xml) file (see above). To allow distinguishing tiles in one SpriteSet, you can also give each sprite a specific class. All sprites that have the same class in one SpriteSet are displayed together.
E.g.
Filename:
Human (the SpriteSet will be saved to a file in directory "xml/Sprite" named "Human.xml")
Classes:
Monster
Animals
etc.
Some operations to Sprites / SpriteSets are only possible if a class (and a filename) is given.

## Sprite Collection

Sprite Collection

The current loaded Sprite Collection is displayed on the left side of the window. You can select a sprite using the mouse (clicking). To add / remove a sprite click the appropriate buttons. Add overwrites any sprite in the collection with the same name.

The "new sprite" button does as it is labeled.

Attention
The name of a sprite must be unique within one SpriteCollection. Even sprites in different classes in the same SpriteCollection must have different names! Otherwise the "other" sprite will be overwritten.
BTW. this allows "easy" transfer of sprites from one class to another class within one SpriteCollection -> just change the classname and save the SpriteCollection!

## Graphics Data

Sprite graphics data

When you build a new sprite or SpriteSet you usually start with the graphical representation of the sprite.
In graphics data area, you can load (previously defined) ImageCollections. You must give the corresponding filename of the ImageCollection followed by the class of ImageSequences you would like to see in that collection.
All ImageSequences are displayed in a horizontal stripe (scrollable). By clicking you can "activate" the clicked ImageSequence. Some data will be displayed.
To set a selected ImageSequence to the current sprite see help for "Actions & Animations" tab.

## Sprite Data

The data section for sprites is divided into 2 tabs:

Sprite base data

Sprite Tab 1

Which is very similar to the first tab of tile data.
Attributes are not supported yet.

Note
Some changes are only activated after you press "add sprite" button. This will certainly change in some future - but as of now it is as it is. Alle sprite data from the GUI is than parsed and added correctly to internal structures and saved to memory.

Aptly named the button should be called "update internal sprite data". The data is NOT saved to a storage device. In order to do that you have to press "Save SpriteSet"!

Just rememeber if changes you made to a sprite which are not visble yet -> once press the "add sprite" button, and everything should be fine!

Action & Animations

Action & Animations

#### Action

This is a editable Combobox. You can add new actions to a sprite by writing its "action name" into the combobox and pressing enter.

Directly below you see empty square boxes. Into these boxes you drag an drop (from the image data section) the animations for each direction for the provided action.
(after "add sprite")

You can select each animation and it will be visible in its animations stages on the left side of the label "selected animation".

To remove a animation, select it and press "remove selected".

#### Selected Animation

For each sequence of the animation you can give the action a delta movement. Coordinates are given as X and Y delta values. Positive delta values means "go right" or "go down", negative values "go left" or "go up".

#### Subsequent Action

Each action can have a subsequent action (which allways has the same direction as the original). For example after the action "Attack" the next action might be "Run". For looping the same action tag the corresponding checkbox (e.g. Run).

#### Animation test

On the left side you see a little squared box, there you can preview the current selected action. The delta movements will be considered. The sprite may run "out of the box". If you wish to compensate that check the "Out of bounds" checkbox. If the sprite moves out of bounds it will "reappear".

#### Additional features

Below the "remove selcted" button there are som additional features a sprite may have:

1. Steps absolut
   If enabled the delta steps a sprite makes are NOT scaled when the sprite is scaled. Meaning "tiny sprites" may make huge steps... (vice / versa)

2. enable automatic movement
   If this enabled, the delta movement information is used to move a sprite. Otherwise the sprite must be moved by some "outer" means.

3. enable updates when not in viewport
   If enabled, a sprite is ALLWAYS updated, regardless whether it is currently in visible in the viewport (of a map) or not. (moving sprites should be allways updated, otherwise they can not "appear" in the viewport, fixed sprites may not need an update if not visible)

4. back shadows

   BackShadow

   No BackShadow

   The backshadow can be configured via:

   1. Thickness

   2. color

   3. and the antialiase

## User export

Not done yet!