Difference between revisions of "Colour map"

From Worms Knowledge Base

Jump to: navigation, search
(updated colour limitations, added Photoshop instructions)
Line 1: Line 1:
 
{{ParentArticle|[[File formats]]}}
 
{{ParentArticle|[[File formats]]}}
  
= Worms Armageddon =
+
= File format =
 
Support for PNG colour maps were added to Worms Armageddon with the '''v3.6.19.7 Beta Update''' (released on 9 February 2004).  
 
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.  
 
W:A maps need to be in a paletted 256-colour mode.  
Line 21: Line 21:
  
 
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.
 
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:
+
Therefore, the colour maps may only use a limited number of colours in the palette ('''excluding black''', which is treated as transparent), without affecting other Worms graphics:
  
 
* 64 colours and less - the map will be displayed perfectly, with no glitches
 
* 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
 
* 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
+
* 97-112 colours - destroyed soil will be solid black; the destroyed-soil border is solid gray. The background gradient palette will be evenly loaded into the remaining space in the palette, and the background gradient is redithered using the map + background palette - thus, a map with 112 colours (bar black) will have a background gradient dithered exclusively from the map's palette.
 
* 113 colours and more - the map will not load.
 
* 113 colours and more - the map will not load.
  
Line 33: Line 33:
  
 
[http://entropymine.com/jason/tweakpng/ TweakPNG] allows manipulation of PNG images on the chunk level, thus allowing chunk import/export, etc.
 
[http://entropymine.com/jason/tweakpng/ TweakPNG] allows manipulation of PNG images on the chunk level, thus allowing chunk import/export, etc.
 +
 +
== Authoring instructions ==
 +
=== Adobe Photoshop ===
 +
Use the following steps to create a WA-compatible map in Adobe Photoshop:
 +
 +
#draw or open your map
 +
#select File -> Save for Web (or Save for Web & Devices in CS3)
 +
#In the options in the right, set the following options:
 +
#*Set '''Optimized file format''' to '''PNG-8'''
 +
#*uncheck '''Transparency''' (if it was checked)
 +
#*Set '''Maximum number of colors in Color Table''' to '''113 or below''' (see [[#Colour_limitation|above]] for details on side effects of using colour ranges)
 +
#*play with the '''Color reduction algorithm''' and '''Dither algorithm''' options until your map looks nice, increase/decrease the number of colours accordingly
 +
#*if there is no black in the colour palette (e.g. Mole Shopper maps), you'll have to add it manually (set '''Colour reduction algorithm''' to '''Custom''', choose the black colour using the controls to the left, and click the '''Add color''' ("Adds eyedropper color to palette") button
 +
#click '''Save''', enter a file name.
 +
 +
<!-- add new programs here -->
 +
 +
To load a colour map in W:A, copy it to your '''User\SavedLevels''' folder, or a subfolder of that folder. You can load your map in W:A by opening the map editor (right-click the map thumbnail), and selecting the map from the drop-down combo box.

Revision as of 01:46, 24 July 2007

(Up to File formats)

File format

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 (excluding 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 - destroyed soil will be solid black; the destroyed-soil border is solid gray. The background gradient palette will be evenly loaded into the remaining space in the palette, and the background gradient is redithered using the map + background palette - thus, a map with 112 colours (bar black) will have a background gradient dithered exclusively from the map's palette.
  • 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.

Authoring instructions

Adobe Photoshop

Use the following steps to create a WA-compatible map in Adobe Photoshop:

  1. draw or open your map
  2. select File -> Save for Web (or Save for Web & Devices in CS3)
  3. In the options in the right, set the following options:
    • Set Optimized file format to PNG-8
    • uncheck Transparency (if it was checked)
    • Set Maximum number of colors in Color Table to 113 or below (see above for details on side effects of using colour ranges)
    • play with the Color reduction algorithm and Dither algorithm options until your map looks nice, increase/decrease the number of colours accordingly
    • if there is no black in the colour palette (e.g. Mole Shopper maps), you'll have to add it manually (set Colour reduction algorithm to Custom, choose the black colour using the controls to the left, and click the Add color ("Adds eyedropper color to palette") button
  4. click Save, enter a file name.


To load a colour map in W:A, copy it to your User\SavedLevels folder, or a subfolder of that folder. You can load your map in W:A by opening the map editor (right-click the map thumbnail), and selecting the map from the drop-down combo box.

Personal tools