Switch language

Default language

 
Random picture
gallery
 
map-creation
 



Pictures





Map :



  • island or cave (no possibility to walk out of map, set the right flag)
  • resolution ≥ 3000x1500px
  • use transparancy for background


Sky :



* at least the same size as the foreground

Wind particules (optionnal) :



  • draw one particule (only the biggest one)
  • use transparency for background


Preview :



  • 300x225px
  • as representative as possible


File config.xml



The file should have the following structure and format:

Code XML :
 
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE resources SYSTEM "../map.dtd" []>
<resources>
 
 <author>
   <name>YOUR NAME</name>
   <nickname>YOUR NICKNAME</nickname>
   <email>YOU AT MAIL DOT COM</email>
   <country>YOUR COUNTRY</country>
 </author>
 
 <surface name="sky" file="NAMEOFSKYFILE.jpg" />
 <surface name="map" file="NAMEOFMAPFILE.png" />
 <surface name="preview" file="NAMEOFPREVIEWFILE.jpg" />
 
 <name>MAP NAME</name>
 <water>WATER TYPE</water>
 <nb_mine>5</nb_mine>
 <is_open>1</is_open>
 
 <sprite name="wind_particle">
   <image file="NAMEOFWINDPARTICULES.png">
     <grid pos="0,0" size="X,Y" array="1,1"/>
   </image>
 </sprite>
 
 <wind>
   <nbr_sprite>6</nbr_sprite>
   <need_flip>1</need_flip>
   <mass>5.0</mass>
   <wind_factor>8.5</wind_factor>
   <air_resist_factor>0.2</air_resist_factor>
   <gravity_factor>0.2</gravity_factor>
   <rebounding>true</rebounding>
   <rebound_factor>3.3</rebound_factor>
 </wind>
 
 <music_playlist>NAMEOFMUSICFILE</music_playlist>
 
</resources>
 


  • <water> with WATER TYPE equals to one of "no", "water", "lava", "dirtywater", "radioactive", "chocolate".
  • <nb_mine>: specify the number of mine in the map.
  • <is_open>: specify if the map is open or closed (an 1=island, 0=cave).
  • size="X,Y": Set windparticules size (exemple : size="63,63").
  • grid pos="X,Y" and array="X,Y" are options used for animated particules.
  • <wind>: Options define some factors for wind particules.



Use the new map : Files



Finally you've got one directory with 5 files:
  • map.png
  • sky.jpg
  • preview.jpg
  • windparticules.png
  • config.xml


Put this directory in ~/.warmux/map/ (under GNU/Linux) or in the Documentsfolder, in warmux\data\map\ (under Windows)

Other tweaks



Add padding around the map



Usually you can't scroll over the borders of your map. But sometimes it's strongly recommend to have some padding around the map in order to make complex maneuvers much easier. You can archive this by using the <add_pad>-Tag:

Code XML :
<add_pad>1</add_pad> <!-- Turns padding on -->
  <point name="upper_left_pad" x="300" y="234" /> <!-- x: padding at the left side; y: padding at the top -->
  <point name="lower_right_pad" x="300" y="0" /> <!-- x: padding at the right side; y : padding at the bottom -->


Multi-layered sky



You may use more than one single sky layer. If you want to do this, strip the <surface name="sky" file="" /> line and add:
Code XML :
<!--insert the number of sky layers here -->
<sky_layer>X</sky_layer>
<!--One entry for each -->
<surface name="sky_layer_0" file="sky1.png" />
<surface name="sky_layer_1" file="sky1.png" />
<!-- and so on -->


Alpha threshold



This feature is available only from 11.01 release on.
The normal behavior for alpha-transparency is, that an alpha value of 255 is solid, and anything else is background. In 0.9.3 you will be able to set a threshold. Any pixel, whose alpha value is smaller than the configured alpha-threshold is threaten as background, any other pixel is foreground and solid. To use this feature, put this line in your config.xml:

Code XML :
<alpha_threshold>###</alpha_threshold>


 
This page has been seen 14473 times