Improved GMS1.4 support

Tiled already has Gamemaker Studio 1.4 support. But in order to load my exported tiled map i have to use the import existing room button in gamemaker. If i save the exported file directly to the rooms folder (using ctrl+s and the export on save feature on) then start the game it will give me compiler errors. If i compare the exported(crashing) .room.gmx file with the converted .room.gmx file in gamemaker it is only missing a few xml tags.

If these missing xml tags could automatically be added then the export to GMS1.4 would be much easier to use. Because i wont have to delete the old room and manually import the new one.

Hmm, when the plugin was implemented I believe the exported map worked immediately. Maybe something still changed in GameMaker: Studio 1.4 since then.

In any case, can you please show us the exported and converted files, so that we can also see the difference and fix up the plugin?

I took a better look at the differences and checked what caused the crashing. And found out the missing colour=“4294967295” tag causes the crashing.

Here is a piece of code from the Tiled export:

    <tiles>
    <tile bgName="bgGrass" x="0" y="0" w="16" h="16" xo="0" yo="0" id="1" depth="1000000" scaleX="1" scaleY="1"/>

Here is a piece of code from a converted Tiled export:

    <tiles>
    <tile bgName="bgGrass" x="0" y="0" w="16" h="16" xo="0" yo="0" id="1" name="tile_1" depth="1000000" locked="0" colour="4294967295" scaleX="1" scaleY="1"/>

More tags are missing and some xml tags but gamemaker does not seem to have a problem with that.
The original files contain a lot of lines and i am not allowed to upload files yet. If you need more i can upload them somewhere else.

But adding a colour tag should fix this problem with the default value of 4294967295.

Edit: I removed the < at the beginning of the tags because the text got removed

1 Like

That’s very helpful, I’ll be sure to add the colour="4294967295" attribute in the next patch release!

Do you know by any chance what GameMaker: Studio 1.4 uses this color for? Are the tile graphics multiplied by this color in order to tint it? Cause in that case, it would be nice to support it with the recently added layer tint color in Tiled as well. And then of course we need to figure out in which format this color is stored (probably ARGB or RGBA).

You need to use ``` (backticks) at the start/end of the code segments, to avoid them being parsed for markup. I’ve edited your post accordingly.

Nice thanks!

I have no idea what this is used for

Today I installed GameMaker: Studio 1.4.9999 so I could test the export and fix it up for Tiled 1.3.3:

I’ve also noticed that this color attribute works as a multiplier, so for Tiled 1.4 I’ll make it work with the added support for layer tint color.

Thanks for bringing up this problem and your help with improving the export!