Alien Breed HUF Map Format

From ModdingWiki
Jump to navigation Jump to search
Alien Breed HUF Map Format
File:Alien Breed HUF Map Format.png
There is no image of a map in this format — upload one!
Format typeMap/level
Map type2D tile-based
Layer count1
Tile size (pixels)16×16
Viewport (pixels)320×176
Games

The 19 .HUF files hold Alien Breed DOS level resources. The game selects them through a 19-entry table in ALIEN.EXE. All use Alien Breed LZHUF Compression; the structure below is the decompressed data. The first level of a new game uses L0MZ.HUF, while the attract demo starts at LBMZ.HUF.

File format

File offset Length Description
0x00 4 Unsigned little-endian decompressed length, 26,228 (74 66 00 00)
0x04 Variable LZHUF bitstream

All 19 files decompress to 26,228 bytes. The first 23,040 bytes are a 120×96 grid of two-byte, big-endian cell words, in row-major order. Cell (x,y) starts at 2 * (y * 120 + x).

Bits Meaning
0–8 Tile index (0–511)
9 Ignored by the original level initialiser
10–15 Six-bit cell type

The remaining 3,188 bytes must be preserved. Their record boundaries and meaning have not been established. The level initialiser copies the first 0x2D00 words and separates tile indices from cell types; it does not establish the meaning of this tail.

Tile sheets

Each level uses three 320×200 .256 sheets. The current port cuts 16×16 cells, 20 per row: 240 tiles from the A sheet, 240 from the B sheet, and 160 from the AN sheet. The third-sheet selection and every cell-type behavior should be checked against the executable and rendered game before modifying a level.

Notes

The map dimensions, bit layout, and level table come from analysis of the DOS level loader documented in the source repository. The earlier docs/huf.md page predates that analysis and still calls these fields unknown. Do not apply the later OpenBreed MAP/SPR/BLK specification to these files. The editor exports decompressed .raw bytes, not a compressed replacement .HUF file.

Files

The collection includes L0MZ.HUF through L9MZ.HUF, LAMZ.HUF, LBMZ.HUF, LZMZ.HUF, and PCMAP1.HUF through PCMAP6.HUF.

Source code

From re-alienbreed, the open-source browser port and asset viewer:

Credits

The Alien Breed-specific format research and parsers were prepared by VorticonCmdr. 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!)