Technical Information

Here you will find some important notes which will improve the performance of the application as well as file format descriptions.

Supported File Formats

The application supports different file formats for loading and saving images and animations:
Description Type Suffix Load Save Color Depths for loading
Amiga animated IFF Animation .iff y n all up to 256 colors
Amiga IFF Image .iff y y all up to 256 colors
Autodesk FLIC Animation .flc y y 256 colors
Autodesk FLIC Animation .fli y n 256 colors
Bitmap Font Format Image/Font .bmf y y 63 colors
Compuserve GIF Image/Animation .gif y y all up to 256 colors
Deluxe Paint Image Image .lbm y y all up to 256 colors
Dr.Halo Image .cut y y all up to 256 colors
JPEG Image Image .jpg y y 16.8 million colors
Paintbrush Image Image .pcx y y 256 colors
Portable Network Graphics Image .png y y all up to 16.8 million colors
Pro Motion Sprite Animation .spr y y 256 colors
Truevision Image Image .tga y y all up to 16.8 million colors
Windows animated Cursor Animation .ani y y all up to 256 colors
Windows AVI Animation .avi y y all up to 16.8 million colors
Windows Bitmap Image .bmp y y all up to 16.8 million colors
Windows Bitmap (Sprite Sheet) Animation .bmp y y 256 colors
Windows Icon Image .ico y y all up to 256 colors
Gameboy Cel Image .cel y y 256 colors

Pro Motion usually saves images and animations with 256 colors, except otherwise specified. In the Preferences (menu File) section Miscellaneous you will find an option called Save BMP, PNG, ICO, GIF with minimal Color Depth....
If this option is enabled then those files are saved with only the colors necessary. That means if you use only the first 16 palette entries for your image then the image is saved as a 16 color image instead of a 256 color image.

When loading an image or animation that contains more than 256 colors (i.e. 24bit-BMP/PNG/TGA, JPG or AVI files) a dialog appears to set the color reduction mode.

Pro Motion supports different file formats for loading and saving non-graphical data such as palettes or stencils:

Description Type Suffix Load Save
Microsoft Palette Color Palette .pal y y
Pro Motion Palette Color Palette .pal y y
JASC Palette Color Palette .pal y y
Gameboy RGB555 Palette Color Palette .pal y y
GIMP Palette Color Palette .gpl y y
Pro Motion Stencil Stencil .stn y y


File Format Descriptions

Pro Motion introduces some own file formats as well as extensions of well known file formats.

The Sprite file
Pro Motion has an own file format for saving animations, the Sprite format. This file type saves an animation by writing the image data plain uncompressed into a file. So these files can be easily read and converted to other formats.

The Header defines the dimensions of the animation.
Position(bytes) Type Description
$00 3 ASCII-chars "SPR" as sign for this format
$03 Word Number of frames
$05 Word WIDTH in pixels
$07 Word HEIGHT in pixels

The Header is followed by the color and animation data at position $09+.

For each frame repeating:
Position(bytes) Type Description
$00 Word delay value for this frame in ms
$02 256*3 Bytes describes the 256 color palette with the values Red, Green, Blue
$302 WIDTH*HEIGHT Byte image data of this frame

Values are stored in the WORD format using the low byte order (little endian). That means that the least significant byte is saved first followed by the most significant byte.

If the image data of the last frame is followed by the characters "TRANSP" then a chunk containing transparency information follows:
Position(bytes) Type Description
$00 Byte transparent pixel


BMP/PNG Sprite sheet
An sprite sheet is stored as standard Windows Bitmap file (BMP) or Portable Network Graphics (PNG). The information that is needed to define the Sprite Sheet layout as well as extra data like frame delay or key frame information is saved into a second file using the same directory and file name but with a different extension (.asd.json).

This file has the following simple structure:
{
  "version": "1.0",
  "fileName": "mySpriteSheetImage.bmp", // name of the file this JSON belongs to
  "width": 1200, // width of the image file in pixels
  "height": 400, // height of the image file in pixels
  "columns": 3, // number of frames horizontally
  "rows": 1, // number of frame rows
  "frames": [ // additional data for every frame
    {
      "duration": 80 // pause in milliseconds before next frame is displayed
    },
    {
      "caption": "Key Frame 1", // there is a key frame and this is the caption that was assigned
      "color": 5724111, // color of the key frame like $00RRGGBB
      "duration": 80
    },
    {
      "caption": "Key Frame 2",
      "color": 5735887,
      "duration": 80
    }
  ]
}

Pro Motion Palette (*.pal)

These color palettes are exactly 768 Bytes large and contain for each of the 256 colors 3 byte values for Red, Green and Blue.

Gameboy RGB555 color palettes (*.pal)

These color palettes are exactly 512 Bytes large. Every RGB color value is stored in two bytes (word) using 5 Bits for each channel:
Bits 0-4 is red, 5-9 is green, 10-14 is blue. Bit 15 is unused.

Text Tile Map (*.txm)

When exporting tile map data this file type can be used. It just stores all tile indexes contained in the map as number values, separated by comma into a text file, line by line:
1,1,1,1,1,1,1,2,3,4,5,6
2,2,2,2,2,2,2,2,2,2,2,2
With this file format you may not use tile mirroring, because the mirror flags are not stored into this type of file.

Gameboy CEL file (*.cel)

This is a simple file format that just stores image data as 8x8 pixel blocks. Each 8x8 pixel block is saved byte wise, all 8 pixels of the first line then the next 8 pixels of the next line. Then the next 8x8 block is stored. There are no information about image width or height since this file format is normally used only to export tile libraries where this information is not needed. The color palette data is stored using a separate file of type Gameboy RGB555.

Gameboy Advance tile map (*.map)

This file format can be used to export tile maps in a format that can be used easily with Game Boy hardware:
Position(bytes) Type Description
$00 DoubleWord Number of tiles in a row (width)
$04 DoubleWord Number of tile rows (height)
$08 Word width * height Word values where each value is divided into Bit sections
0..9 tile index
10 flag if the tile must be displayed mirrored horizontally
11 flag if the tile must be displayed mirrored vertically
12..15 unused

Simple tile map (*.stm)

This file format can be used to export tile maps into a custom structured format:
Position(bytes) Type Description
$00 4 ASCII-chars "STMP" as sign for this format
$04 Word Number of horizontal tiles = WIDTH
$06 Word Number of vertical tiles = HEIGHT
$08   From this position there are WIDTH * HEIGHT entries made up of the following TileReference structure:

Position (bytes) Type Description
$00 Word Tile index
$02 Byte Flag if the tile is to be displayed mirrored horizontally. 0=no mirror
$03 Byte Flag if the tile is to be displayed mirrored vertically. 0=no mirror

Tile codes (*.tlc)

This file format can be used to export extra tile code data. Every tile can receive a code to define special options like collision flags or "tile can be picked up". For every tile in the tile set it contains a word value.

Extension of the Autodesk FLC-Format

So far you can save only animations using Autodesk FLC-format that only have one delay value for all frames. I expanded the format a bit so that each single frame can have its own delay value. The following change has been made:

Now the bytes 8 and 9 of each FRAMEHEADER (yet unused and 0) are a 16-Bit delay value for this specific frame.

A complete description of the FLC-format is available at https://en.wikipedia.org/wiki/FLIC_(file_format).


Related topics

Getting started
Contents
Tile Mapping Data Export
Tile Mapping Primer

Last modified: 29 January 2023