Game Maker Studio 2 support

(Yin) #1

Any plans on adding GMS2 support? I’m currently looking into how to convert .tmx to GMS2 tilemap layer format, which is very similar but seems to be off by 1:

but I’m stuck on these “214748663” numbers for flipped tiles. How do I convert a regular tile number to this? Is it a “not” operation?

Any help is appreciated!

edit: I found this http://doc.mapeditor.org/reference/tmx-map-format/#tile-flipping

and I used a converter to check the far end of the tile IDs for both GMS2 and Tiled. This is what it looks like:

``````Tiled:

Tile 32

0 Degrees: 32 : 0x00000020
90 Degrees: 2684354592 : 0xA0000020
180 Degrees: 3221225504 : 0xC0000020
270 Degrees: 1610612768 : 0x60000020

Flipped:

0 Degrees: 2147483680 : 0x80000020
90 Degrees: 3758096416 : 0xE0000020
180 Degrees: 1073741856 : 0x40000020
270 Degrees: 536870944 : 0x20000020

GMS2:

Tile 31

0 Degrees: 32 : 0x00000020
90 Degrees: 1073741855 : 0x4000001F
180 Degrees: 805306399 : 0x3000001F
270 Degrees: 1879048223 : 0x7000001F

Flipped:

0 Degrees: 268435487 : 0x1000001F
90 Degrees: 1342177311 : 0x5000001F
180 Degrees: 536870943 : 0x2000001F
270 Degrees: 1610612767 : 0x6000001F
``````

So basically GMS2 goes from 1 to 7 and Tiled goes two by two.

(Thorbjørn Lindeijer) #2

Tiled is using the highest three* bits to store three flipping states. Horizontal, vertical and (anti-)diagonal. The flipping states also allow for 90-degree based rotation. I don’t currently know how GMS 2 stores it, but it looks like you’ll find out!

In any case, GMS 2 support would be great and I’ve opened the following issue about it:

https://github.com/bjorn/tiled/issues/1642

I can’t say when I would get around to it though. Maybe you or somebody else would like to work on this?

Btw, given that GMS 2 has a much improved room and tileset editor compared to 1.4, I’m curious to hear why you’d anyway like to use Tiled.

*) Actually since Tiled 1.0, a fourth bit is used to be able to perform 60-degree rotations on hex tiles.

(Yin) #3

Hi bjorn!

Unfortunately I’m not a real programmer so there’s no way I could write a plugin for Tiled, but I made a little application that takes the csv from the .tmx and converts it into the GMS2 one. It’s very VERY basic (seriously I have no idea what I’m doing) and it’s made in Construct 2 (the only tool I know how to use properly) but it does the job as long as you only have regular/rotated/mirrored tiles.