Game Maker Studio 2 support

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.

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:

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.

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.

Here’s the link:
https://drive.google.com/drive/folders/0BxlxB7FQigqjUmhrVnRTWEVQX00?usp=sharing
(Downloads are in the release folder)

This app takes the csv tile by tile, converts it to hex and makes the alterations, then back to decimal values. I’ve also included the .capx and anyone with a free C2 license can take a look but like I said, it’s very hacky.

Oh and the main reason I want to use Tiled is so I can work with other people who don’t own a GMS2 license. This way they can use Tiled to work on the levels while I focus on the programming, and when they’re done I can just import their work onto the game myself.

I do like the tilemap editor in GMS2 but it’s also very handy to be able to edit it with Tiled without having to download GMS2 and opening the whole project, too.

By the way, thanks for this amazing tool! Hope someone makes on a proper GMS2 export.

1 Like

Any progress on this? :frowning: