GBM

GBM, or the Glest Binary Map format, is the standard type of map. GBM is limited to 4 players, but can be used on any of Glest's engines, including MegaGlest and the Glest Advanced Engine. Maps in the GBM format are created in the Map Editor.

Header Structure
Version 1 (GBM): struct MapFileHeader{ int32 version; int32 maxPlayers; int32 width; int32 height; int32 altFactor; int32 waterLevel; int8 title[128]; int8 author[128]; int8 description[256]; };

Version 2 (MGM) GAE: struct MapFileHeader { int32 version; int32 maxPlayers; int32 width; int32 height; int32 altFactor; int32 waterLevel; int8 title[128]; int8 author[128]; union { int8 description[256]; struct { int8 short_desc[128]; int32 magic; // 0x01020304 for meta int8 meta[124]; };   }; };

Or Version 2[.1] (MGM) in MegaGlest, which supports cliffs: struct MapFileHeader { int32 version; int32 maxPlayers; int32 width; int32 height; int32 altFactor; int32 waterLevel; int8 title[128]; int8 author[128]; union { int8 description[256]; struct { int8 short_desc[128]; int32 magic; // 0x01020304 for meta int32 cliffLevel; int8 meta[120]; };   }; };