DrawnMapFormat.wiki
author Wuzzy
Wed, 17 Apr 2019 00:19:05 +0100
changeset 1735 4b658d116488
parent 1681 b41bffc4636e
child 2111 076016620f22
permissions -rw-r--r--
Sandbox: Edited via web interface
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
432
e441f3f51dac Add summary
almikes@aol.com
parents: 226
diff changeset
     1
#summary Short description of the file format of hand-drawn maps
e441f3f51dac Add summary
almikes@aol.com
parents: 226
diff changeset
     2
748
2051f403ddac DrawnMapFormat: Add title
Wuzzy
parents: 666
diff changeset
     3
= Hand-drawn maps =
666
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
     4
== Introduction ==
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
     5
Hand-drawn maps are maps which are created by the player using the in-game map editor.
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
     6
1621
41a7f751b77b DrawnMapFormat: Warning about outdatec file spec
Wuzzy
parents: 1222
diff changeset
     7
== File format (outdated) ==
41a7f751b77b DrawnMapFormat: Warning about outdatec file spec
Wuzzy
parents: 1222
diff changeset
     8
*NOTE*: This section is outdated.
41a7f751b77b DrawnMapFormat: Warning about outdatec file spec
Wuzzy
parents: 1222
diff changeset
     9
666
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
    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.
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
    11
226
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    12
Drawn map is described by a list of points, which define polylines to draw and format of each polyline.
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    13
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    14
Point is defined as
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    15
|| Big-endian int16 || Big-endian int16 || Byte ||
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    16
|| *X* coordinate || *Y* coordinate || *flags* ||
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    17
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    18
where *flags* are:
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    19
|| 8th bit || 7th bit || 6th-1st bits ||
1222
111d15f81dbd DrawnMapFormat: Fix typos
Wuzzy
parents: 798
diff changeset
    20
|| if set, this is a first point of polyline || if set, polyline is erasing || *width* (thickness) of line ||
226
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    21
1222
111d15f81dbd DrawnMapFormat: Fix typos
Wuzzy
parents: 798
diff changeset
    22
… where *width* defines `(width * 10) + 6` pixels width line to draw.
226
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    23
1222
111d15f81dbd DrawnMapFormat: Fix typos
Wuzzy
parents: 798
diff changeset
    24
Second and further points of polyline have 8th bit of *flags* unset, the content of others are ignored for those.
226
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    25
1222
111d15f81dbd DrawnMapFormat: Fix typos
Wuzzy
parents: 798
diff changeset
    26
A single-point polyline defines a circle.
666
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
    27
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
    28
== Sharing hand-drawn maps ==
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
    29
Hand-drawn maps will be automatically transferred when playing online.
f38a002a0796 Give the article more flesh
Wuzzy
parents: 432
diff changeset
    30
1681
nemo
parents: 1621
diff changeset
    31
But if you wish you can still share your creations in the [https://www.hedgewars.org/node/2849 Hand-Drawn Maps Submission Thread].