Set GameMaker Room properties

(Kevin Trepanier) #1

Whenever I export a room from Tile and import it in GameMaker Studio, there’s several parameters that need to be re-entered manually into the room in GameMaker. It would reduce some overhead if I could set those directly in Tiled to have them automatically set in GameMaker, so I don’t have to re-enter them manually with every little change I make to my room.

The said parameters are : the game speed (from the “settings” tab of the room, see below).


And all settings from the “views” tab of the room (see below : enable the use of views, visible when room starts, view in room X, Y, W, H, port on screen X, Y, W, H, Object following, Name, Hbor, Vbor, Hsp, Vsp).


Thanks a lot.

(Thorbjørn Lindeijer) #2

Actually you’ll find that most of these properties can already be set in Tiled, it’s just not documented yet.

Add an int property with the name speed to the map properties.

For the views, you create rectangle objects and fill in view as their type. The x, y, w and h properties for “View in room” are filled in based on the location and size of the object. “Visible when room starts” is based on the visibility of the object (maybe not ideal). The other properties can be set by adding int properties with names xport, yport, wport, hport, hborder, vborder, hspeed and vspeed. Finally I think the name of the object to follow is covered by a string property with name objName.

There are more properties supported (mostly the physics ones). I’ll see about adding them all to the documentation soon.

(Kevin Trepanier) #3

This worked fine for the game’s speed but I can’t make it work for the views. Here’s a screenshot of my “view” type object in Tiled. Am I doing something wrong? Thanks.


(Thorbjørn Lindeijer) #4

Sorry, the views are only supported on the master branch, so you’ll need to install a development snapshot for this rather than 1.0.2.

(Thorbjørn Lindeijer) #5

I’ve just finally gotten around to documenting the export formats supported by Tiled, including various details like all the custom properties supported by the GameMaker: Studio 1.4 export. Check it out and please let me know if you’re missing something, or just open a pull request!

(TrunX) #6

Good job!

What seems missing is the information, that tilesets and single tiles from image collections must have the same name as the backgrounds inside GameMaker. Otherwise you get an endless loop of error massages in GameMaker stating that the background is missing and the only way to terminate it is by killing the process. (Not Tiled’s fault)

(Kevin Trepanier) #7

Thanks a lot! I’ve also seen the GitHub entry about originX and originY. I haven’t had the chance to test it thoroughly yet but I’ll let you know when I get there.

@TrunX : From my experience, the loop of error messages is not endless but it can certainly test your patience. My guess is that there is one message per tile, which can easily go up in the thousands depending on the map size.