ART Format (Build)
The ART format is used by Ken Silverman's Build engine to store game textures and sprites. It contains a number of individual graphics called tiles.
Contents |
File Names and Tile Numbers
According to Ken Silverman's documentation, ART files can be named anything, as long as they end in three digits and .ART, but for most games they are named TILES###.ART. The Build engine games will load these in order starting from 000 until they can't find any more. Every tile in the game has a numerical index, and each ART file for a particular game holds a range of these. For example, TILES000.ART may hold tiles 0 to 255, and TILES001.ART would hold tiles 256-511. The range of indexes held by a particular file are indicated in the header. The tiles are normally stored sequentially (TILES000.ART holding the first set, and each higher numbered file continuing where the previous left off) with a consistent number of tiles per file, but it is up to the particular game's developers.
Header
| Data Type | Name | Description |
|---|---|---|
| UINT32LE | artversion | version number, should be 1. |
| UINT32LE | numtiles | number of tiles, unused. The number of tiles can be determined by the localtilestart and localtileend fields. |
| UINT32LE | localtilestart | number of first tile in this file |
| UINT32LE | localtileend | number of last tile in this file. |
| UINT16LE[localtileend-localtilestart + 1] | tilesizx | array of the x-dimensions of all of the tiles in the file |
| UINT16LE[localtileend-localtilestart + 1] | tilesizy | array of the y-dimensions of all of the tiles in the file |
| UINT32LE[localtileend-localtilestart + 1] | picanm | array of attributes for all the tiles |
Tile Attributes
Entries in the picanm array store several properties for each tile:
| bits 31-28 (4 bit unsigned integer) | bits 27-20 (8 bit signed integer) | bits 19-12 (8 bit signed integer) | bits 11 and 10 (2 bit enumeration) | bits 9-4 (6-bit unsigned integer) | bits 3-0 |
|---|---|---|---|---|---|
| Animation speed | Y-center offset | X-center offset | Animation type: 00 = no animation, 01 = oscilating animation, 10 = animate forward, 11 = animate backward | Number of frames | unused? |
Pixel Data
The pixels are stored as bytes, corresponding to indexes in the palette stored in PALETTE.DAT. The pixels in each tile are stored columnwise, starting from the top-left. For a 4x4 tile, the offsets for each pixel would be arranged like this:
| 0 | 4 | 8 | 12 |
| 1 | 5 | 9 | 13 |
| 2 | 6 | 10 | 14 |
| 3 | 7 | 11 | 15 |
Source
- This information comes from BUILDINF.TXT in the Build source files.