432
+ − 1
#summary Short description of the file format of hand-drawn maps
+ − 2
748
+ − 3
= Hand-drawn maps =
666
+ − 4
== Introduction ==
+ − 5
Hand-drawn maps are maps which are created by the player using the in-game map editor.
+ − 6
1621
+ − 7
== File format (outdated) ==
+ − 8
*NOTE*: This section is outdated.
+ − 9
666
+ − 10
Hand-drawn maps are saved with a file name suffix of “.hwmap”. The saving location is freely chosen by the user; Hedgewars does not use any predefined location to save hand-drawn maps.
+ − 11
226
+ − 12
Drawn map is described by a list of points, which define polylines to draw and format of each polyline.
+ − 13
+ − 14
Point is defined as
+ − 15
|| Big-endian int16 || Big-endian int16 || Byte ||
+ − 16
|| *X* coordinate || *Y* coordinate || *flags* ||
+ − 17
+ − 18
where *flags* are:
+ − 19
|| 8th bit || 7th bit || 6th-1st bits ||
1222
+ − 20
|| if set, this is a first point of polyline || if set, polyline is erasing || *width* (thickness) of line ||
226
+ − 21
1222
+ − 22
… where *width* defines `(width * 10) + 6` pixels width line to draw.
226
+ − 23
1222
+ − 24
Second and further points of polyline have 8th bit of *flags* unset, the content of others are ignored for those.
226
+ − 25
1222
+ − 26
A single-point polyline defines a circle.
666
+ − 27
+ − 28
== Sharing hand-drawn maps ==
+ − 29
Hand-drawn maps will be automatically transferred when playing online.
+ − 30
1681
+ − 31
But if you wish you can still share your creations in the [https://www.hedgewars.org/node/2849 Hand-Drawn Maps Submission Thread].