author | vittorio.giovara@gmail.com |
Mon, 27 Jun 2011 22:35:05 +0000 | |
changeset 115 | 3278ecf295a3 |
parent 106 | ee13fb16ebb5 |
child 151 | 33266ae95c27 |
permissions | -rw-r--r-- |
96 | 1 |
*currently under construction* |
2 |
||
3 |
This page describes the technically relevant aspects of preset maps in Hedgewars |
|
4 |
||
5 |
<wiki:toc max_depth="3" /> |
|
6 |
||
7 |
---- |
|
8 |
||
9 |
= Introduction = |
|
10 |
||
11 |
One of the map types Hedgewars supports are maps that were previously drawn by an artist. |
|
12 |
||
13 |
The looks of such maps are distinctly defined and are not subject to randomized values. |
|
14 |
||
15 |
Additionally these maps allow [LuaGuide Lua-script] to be associated with them in order to enable adding specific gameplay changes and map behavior. |
|
16 |
||
17 |
---- |
|
18 |
||
19 |
= Location = |
|
20 |
All maps are automatically loaded from the [HedgewarsDataDir Hedgewars data directory]. |
|
21 |
||
22 |
In this directory there has to be a folder for every map, named after the desired map name. |
|
23 |
||
24 |
*Examples:* |
|
25 |
* _Data/Maps/!MyVeryOwnMap_ |
|
26 |
* _Data/Maps/Ropes_ |
|
27 |
* _Data/Maps/Sheep_ |
|
28 |
* etc. |
|
29 |
||
30 |
---- |
|
31 |
||
32 |
= Files = |
|
33 |
||
34 |
Within the folder of every map the following files are expected to be there: |
|
35 |
||
36 |
== Basic files == |
|
37 |
=== map.cfg === |
|
38 |
Configuration file. |
|
39 |
||
105
5aafdbd7206f
Edited wiki page PresetMaps through web user interface.
kyberneticist
parents:
97
diff
changeset
|
40 |
* First line is the name of the [Theme] used by the map (for background and clouds, flakes, water, etc) |
5aafdbd7206f
Edited wiki page PresetMaps through web user interface.
kyberneticist
parents:
97
diff
changeset
|
41 |
* Second line is max. number of hedgehogs supported. If the second line is not provided, it is assumed to be 18 |
96 | 42 |
|
43 |
||
44 |
||
45 |
||
46 |
=== map.png === |
|
47 |
Image of visible land area. |
|
48 |
* Usually _width/length ratio_ of 2:1 |
|
49 |
* Typical size: 2048 x 1024 |
|
50 |
* Max size: 4096 x 2048 |
|
51 |
* If there is no _mask.png_, this image will also be used for deciding what pixels are subject to collision: _alpha value_ not equal to 0 (so below max transparency) will be considered land |
|
52 |
||
53 |
=== preview.png === |
|
54 |
Preview image of the map |
|
55 |
* size: 256 x 128_ |
|
56 |
||
57 |
== Optional files (for advanced features and adjustments) == |
|
58 |
=== mask.png === |
|
59 |
Image defining the collision areas of the map. |
|
60 |
||
61 |
* Pixels with _alpha value_ = 0 will not be subject to collision |
|
62 |
* White pixels will be terrain |
|
63 |
* Red pixels will be indestructable terrain (regardless of game mode settings) |
|
64 |
||
65 |
*Examples:* |
|
66 |
* [http://hedgewars.googlecode.com/hg/share/hedgewars/Data/Maps/Blizzard/mask.png Mask] of [http://hedgewars.googlecode.com/hg/share/hedgewars/Data/Maps/Blizzard/map.png Blizzard Map] |
|
67 |
(Transparent areas may not be recognizeable as such in your browser/image preview program, so open e.g. in [http://www.gimp.org/ Gimp]) |
|
68 |
||
97
0803dadcc229
Edited wiki page PresetMaps through web user interface.
sheepyluva
parents:
96
diff
changeset
|
69 |
|
96 | 70 |
=== map.lua === |
71 |
A Lua-script to be used together with the map. |
|
72 |
||
73 |
See the LuaGuide for more information on Hedgewars' scripting support. |
|
74 |
||
75 |
== Image format == |
|
76 |
* PNG, 8-bit/color RGBA (so 32 bit) |
|
105
5aafdbd7206f
Edited wiki page PresetMaps through web user interface.
kyberneticist
parents:
97
diff
changeset
|
77 |
* Gamma correction and colour profiles should not be applied, in order to ensure the map is loaded identically on OSX as it is on other operating systems by SDL. To ensure this happens, please run: |
5aafdbd7206f
Edited wiki page PresetMaps through web user interface.
kyberneticist
parents:
97
diff
changeset
|
78 |
pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB old/map.png new/map.png |
106
ee13fb16ebb5
Edited wiki page PresetMaps through web user interface.
kyberneticist
parents:
105
diff
changeset
|
79 |
|
105
5aafdbd7206f
Edited wiki page PresetMaps through web user interface.
kyberneticist
parents:
97
diff
changeset
|
80 |
or be sure your image editing software has these options disabled. |
96 | 81 |
|
82 |
---- |
|
83 |
= Editing software recommendations = |
|
84 |
== Images == |
|
85 |
A vector based drawing software is recommended for creating the maps. |
|
86 |
||
87 |
(Reasons for that: Edges are usually automatically smoothed on export; Easier to meet [http://www.hedgewars.org/node/704 Hedgewars Graphics rules, style constraints, guidelines]; Images are easier to change, adjust and maintain style) |
|
88 |
||
97
0803dadcc229
Edited wiki page PresetMaps through web user interface.
sheepyluva
parents:
96
diff
changeset
|
89 |
If you don't have one, check out the free open-source [http://inkscape.org Inkscape]: There are various [http://lmgtfy.com/?q=inkscape+tutorial Inkscape tutorials] online, so you should be able to get started easily. |