Captain Comic Map Format

From ModdingWiki
Jump to: navigation, search
Captain Comic Map Format
Captain Comic Map Format.png
Format typeMap/level
Map type2D tile-based
Layer count1
Tile size (pixels)16×16
Viewport (pixels)193×160
GamesCaptain Comic

The Captain Comic Map Format stores the playable game levels. Each level is stored in a separate file in the game directory, using the .PT filename extension.

The files only store the map background layer. It is currently unknown how to control where the player starts, or where enemies and powerups appear.

Contents

File format

The file consists of a width, height and then a list of tiles.

Signature

There is no signature, however careful processing of the header can be used to check whether the width and height correctly describe the file size. This could be confused with an image file however, so some other checks will be required (such as the absence of certain unused byte values, perhaps.)

Header

Each file begins with the following header.

Data type Description
UINT16LE width Width of map, in number of tiles
UINT16LE height Height of map, in number of tiles

The map data follows immediately, with one byte for each tile, left-to-right and top-to-bottom. The total size of this section is the map width multiplied by the map height.

Map codes

Map codes are direct indices into the tileset. So a map code of 0x01 means the second tile in the tileset should be drawn at that location. The tileset to use is matched up by filename (FOREST.TT2 provides the tiles for FOREST[0-2].PT, for example.)

Credits

This file format was reverse engineered by Malvineous. 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!)

Personal tools
programming