You were correct, information about flipped tiles is stored in the
upper bits of the "gid". Horizontal flip is 0x80000000 and vertical
flip is 0x40000000.
The next Tiled release will support rotation; for this the 0x20000000
bit will represent transpose (flipping the x/y axes).
Hope that helps,
Petr Viktorin
> --
> Tiled Map Editor mailing list
> mape...@googlegroups.com
> http://groups.google.com/group/mapeditor
>
There is no way to choose hex rather than base10. Why would you want to do so?
>> On Sat, Nov 12, 2011 at 18:57, mojoe <joiey.see...@gmail.com> wrote:
>> > <tile gid="1073741985"/>
>> > <tile gid="1073741986"/>
>> > <tile gid="1073741987"/>
>> > <tile gid="1073741988"/>
>> > <tile gid="1073741989"/>
>> > <tile gid="1073741990"/>
>> > <tile gid="1073741991"/>
I'd like to point out that this is the least space-efficient and
slowest method of storing the tile layer data. I'd recommend against
using pure XML and choose CSV when you need readability (but that
doesn't hold when flipping anyway) or binary (base64-encoded) layer
data for smaller files that are faster to load.
I'm considering to deprecate the above format since it's a bit of a trap.
Best regards,
Bjørn
I'm not planning to use any of the tmx formats anyway. I'm creating a parser that will write them to a different file format for my game engine.
On Sat, Nov 12, 2011 at 6:23 PM, Petr Viktorin <enc...@gmail.com> wrote:
> Hello,
> The documentation is at https://github.com/bjorn/tiled/wiki/TMX-Map-Format.
>
> You were correct, information about flipped tiles is stored in the
> upper bits of the "gid". Horizontal flip is 0x80000000 and vertical
> flip is 0x40000000.
>
> The next Tiled release will support rotation; for this the 0x20000000
> bit will represent transpose (flipping the x/y axes).
>
Please remember hex tiles when adding rotation. :)
--
/Pelle
Unfortunately the rotation won't work for hex tiles, since as Petr
pointed out they are implementing using a bit to indicate a swap of
the x and y axes.
Regards,
Bjørn
2011/11/13 Thorbjørn Lindeijer <thor...@lindeijer.nl>:
I guess that the bits used for rotation mirroring on rectangular (and
iso?) tiles can be used differently for hexagon tiles without causing
any conflicts in the file format? But to get all the possible
rotations/mirrorings of hexagons you might need 3 or 4 bits.
--
/Pelle