Colour map

From Worms Knowledge Base

Jump to: navigation, search
(Up to File formats)

Worms

The Amiga version of Worms supports .WRM files, a customised .IFF variant. Worms maps need to be in a paletted 8-colour mode. Additional information concerning gravity and friction are stored in the .info icon file for the .WRM file (all Amiga files with icons have an accompanying .info file, otherwise they are "hidden" files). The water and sky colours can be modified by including a set of four numbers prior to the extension but after the map name, e.g. "RUSHMORE.1234.WRM".

The palette must contain the following colour references, as they are also used for other elements of the game:

  • 00 - Black or dark colour (transparency)
  • 01 - White or near-white (also used for sheep, worms' eyes, worms' name/HP font, and graves)
  • 02 - Pink (also used for worms' bodies and antialiasing on worms' name/HP font)
  • 03 - Any colour (also used for mines and crates)
  • 04 - Lighter variant of 03 (also used for shading on mines and crates)
  • 05-07 - Any colours

Worms: The Directors Cut

WormsDC features support for the above .WRM map files, as well as a new 16-colour .WRM16 map format. Like its predecessor, the .WRM16 file format is a variant of the .IFF image file format. .WRM16 files must be in a paletted 16-colour mode. Additional information concerning gravity, friction, water colour & type, and mountain set & palette are incorporated into the file using WormPrefs, which can also be used to insert a brackground later into the map.

The palette must contains the following colour references, as they are also used for other elements of the game:

  • 00 - Black or dark colour (transparency)
  • 01 - White or near-white (also used for sheep, worms' eyes, worms' name/HP font, and graves)
  • 02 - Pink (also used for worms' bodies and antialiasing on worms' name/HP font)
  • 03 - Any colour (also used for mines)
  • 04 - Lighter variant of 03 (also used for shading on mines)
  • 05 - Any colour (also used for crates)
  • 06 - Lighter variant of 05 (also used for shading on crates)
  • 07-15 - Any colours


Worms Armageddon

Support for PNG colour maps were added to Worms Armageddon with the v3.6.19.7 Beta Update (released on 9 February 2004). W:A maps need to be in a paletted 256-colour mode. The number of colours that may appear in the map is restricted as well. W:A stores the extra map settings (water level, borders, etc.) in an extra PNG chunk.

The black colour, which must be present in the colour palette, is considered as transparent (zones/pixels painted black will appear as free space in the game).

Map size

Versions of W:A before 3.6.27.4 only allowed maps that are exactly 1920×696 pixels in size. Version 3.6.27.4 introduces support for arbitrarily-sized maps, with the following restrictions:

  • the width and height of a map must be divisible by 8;
  • a cavern map may now be up to 32512 pixels wide and 32600 pixels tall;
  • an island is limited to being 28416 pixels wide and 30552 pixels tall;
  • the minimum map size is 640×32 pixels.

Colour limitation

Since W:A uses a paletted display, the number of colours that may appear simultaneously on-screen is limited. The majority of the colour space is used for in-game graphics for the Worms, weapons, objects, water, UI elements, etc. Therefore, the colour maps may only use a limited number of colours in the palette (not counting black, which is treated as transparent), without affecting other Worms graphics:

  • 64 colours and less - the map will be displayed perfectly, with no glitches
  • 65-96 colours - the map background sprites (falling debris, clouds, etc.) are removed; the destroyed-soil background may be glitchy
  • 97-112 colours - the entire background becomes solid black; destroyed soil is also solid black; the destroyed-soil border is solid gray
  • 113 colours and more - the map will not load.

PNG chunk

W:A stores the extra settings in an extra PNG chunk, labeled w2lv or waLV. The chunk, excluding the label header, is 40 bytes long, and contains the same data as the header for monochrome maps. Extensions to the header format add extra bytes at the end; so far, there is one optional extra byte which controls the number of worm/object placement holes (the default is 18).

TweakPNG allows manipulation of PNG images on the chunk level, thus allowing chunk import/export, etc.

Personal tools