Realms of Chaos Tileset Format

From ModdingWiki
(Redirected from BG Format)
Jump to navigation Jump to search
Realms of Chaos Tileset Format
There is no image of a tileset in this format — upload one!
Format typeTileset
HardwareVGA
Max tile count512
PaletteExternal
Tile names?No
Minimum tile size (pixels)16×16
Maximum tile size (pixels)16×16
Plane count1
Plane arrangementLinear
Transparent pixels?No
Hitmap pixels?No
Metadata?None
Supports sub-tilesets?No
Compressed tiles?No
Hidden data?No
Games

The BG Format is used in Realms of Chaos to store non-transparent tile graphics.

File format

Files in this Format contain four blocks of interleaved 8bpp pixel values for up to 512 16x16 pixel tiles. This means that each tile consists of four blocks (64 bytes each). The first block contains all pixels where x=0 mod 4, second block: x=1 mod 4 etc. The pixel data is stored sequentially (left to right, top to bottom) for each tile.

The number of tile graphics in a file can be calculated by dividing the file size by 256. When the tileset is to be shown to the user, it should be displayed with a width of 20 tiles (320 pixels).

Credits

This file format was reverse engineered by K1n9_Duk3. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)