LVL Format
Most .LVL files in current use follow this format. Some .lvl files, however, are Extended LVL maps. The format is reverse compatable, so there's no way to tell if you have a regular or extended .LVL file from inside the game. The way you can tell the difference is:
If the map does not have a tileset bitmap appended to it (first two bytes are not 'BM') and the first four bytes are 'elvl' then you have an Extended .LVL file.
If the map does have a tileset bitmap (first two bytes are 'BM') then check the bfReserved1 field of the BITMAPFILEHEADER. If it is 49720, and the bfSize is not 49718, you are guarenteed to either have an eLVL file, or a corrupt file. For more information see the ELVL Format.
This regular format is also described in http://www4.ncsu.edu/~rniyenga/subspace/old/lvlformat.html
Basically it is a bitmap with tile data appended to it. Each tile is represented in this format: (little endian)
struct { unsigned long x : 12; unsigned long y : 12; unsigned long tile : 8; };
The x and y must not exceed 1023. The tileset can be any bit depth, but history puts it at 8bit since the original Subspace uses an 8bit palette.
Tileset
This is an uncompressed 256-color bitmap image 304x160 pixels, making each tile is 16x16 pixels.
http://wiki.minegoboom.com/upload/images/tileset.jpg
Stamps
These are special animated tiles. The most popular map editor SSME calls them stamps.
There are five stamps available:
- A small asteroid.
- A large asteroid (2x2 tiles).
- Another small asteroid (was originally a large asteroid).
- A space station (6x6 tiles).
- A worm hole (5x5 tiles).
Extra Tiles
There are some times, which are not meant to be part of typical mapmaking programs, but have been discovered and may have uses.
Tile: Description 191: Invisible on screen, Visible on radar, Ships can go through them, Items bounce off it, Thors go through it. (if you "launch" an item while in it, the item will float suspended in space) 192-215: Invisible on screen, Visible on radar, Solid block (like any other tile) 216: a small asteroid, eveyone already knows about this... 217: a medium asteroid, everyone alreay knows about this... 218: another small asteroid, just the same as the other one, accept the gfx's are alittle diffrent 219: a spacestation, everyone knows about this... 220: a wormhole, everyone knows about this... 221-240: Invisible on screen, Visible on radar, Solid block (like any other tile) 241: Invisible on screen, Visible on radar, Ship can go through it but Items dissapear when they touch it. 242: Invisible on screen, Invisible on radar, Warps your ship on contact, items bounce off it, Thors dissapear on contact (!) 243-251: Invisible on screen, Invisible on radar, Solid block (like any other tile) 252: Visible on screen (Animated NME door), Invisible on radar, Items go through it, your ship gets warped after a random amount of time (0-2 seconds) while floating on it. 253: Visible on screen (Animated Team door), Invisible on radar, Items go through it, so does your ship. 254: Invisible on screen, Invisible on radar, Items go through it, So does your ship. idk what its used for, but it seems you cant door while on/near it. 255: Visible On screen (Animated Green Prize), Invisible on radar, Items go through it, So does your Ship. This is a green, but it doesent show up on radar, and no matter how many times you fly over it, you will never pick it up, ever.