Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameMaker Studio 2 support #1642

Closed
bjorn opened this issue Jul 7, 2017 · 19 comments · Fixed by #2979
Closed

GameMaker Studio 2 support #1642

bjorn opened this issue Jul 7, 2017 · 19 comments · Fixed by #2979
Assignees
Labels
feature It's a feature, not a bug. help wanted Issues I'd love for somebody else to help out with!
Milestone

Comments

@bjorn
Copy link
Member

bjorn commented Jul 7, 2017

Currently Tiled ships with an export plugin for GameMaker: Studio 1.4. With GameMaker Studio 2, YoYo Games has changed the map format entirely. It is now JSON based instead of XML and the tile layer data is saved in a very similar fashion as Tiled JSON maps.

Even though GameMaker Studio 2 ships with quite a decent tile map editor, it would still be interesting to add support for this new version as well. It would be helpful for those already using Tiled that are porting their game to the newer version, as well as for people who have reason to prefer Tiled for making their maps.

Requested in this forum post and this forum post.

@bjorn bjorn added the feature It's a feature, not a bug. label Jul 7, 2017
@mccordgh
Copy link

Bump! Any plans for GMS 2 support in the works at all ??

@bjorn
Copy link
Member Author

bjorn commented Dec 11, 2017

@mccordgh It's definitely in the plans (embodied by this issue), but I can't say when I would get around to it. There's a lot of other high-priority stuff I need to get around to first.

@mccordgh
Copy link

@bjorn Anyway I could help? :)

@bjorn
Copy link
Member Author

bjorn commented Dec 11, 2017

@mccordgh Sure, you can either fund it or code it. I'm here for questions if you need any help to get started with implementing this. You can read this page about how to get started compiling Tiled yourself, and you could start the GameMaker Studio 2 plugin by copying the GameMaker: Studio 1.4 plugin that lives in src/plugins/gmx (probably to src/plugins/gms2).

The old format was XML-based, so the plugin used QXmlStreamWriter. The new format is JSON-based and you could probably use QJsonDocument to construct the contents. Unless the limited formatting options are a problem, in which case we could adapt the LuaTableWriter from the Lua plugin to be able to write JSON files.

@mccordgh
Copy link

@bjorn Thanks for that info, I would love to contribute if I can.

@mccordgh
Copy link

I am not going to be able to work on this right now, as my attention is needed elsewhere. Just wanted to let you know. Sorry!

@Dene33
Copy link

Dene33 commented Feb 15, 2018

Any progress on this? :(

@bjorn
Copy link
Member Author

bjorn commented Feb 19, 2018

@Dene33 No. Maybe you'd be interested in helping out with this?

@bjorn bjorn added the help wanted Issues I'd love for somebody else to help out with! label Feb 19, 2018
@bjorn
Copy link
Member Author

bjorn commented Apr 26, 2018

While this export option is not available yet, people who want to export Tiled maps to GMS 2 can give GMTiled a try.

@PoppyWorks
Copy link

Would love to have this feature!

@meseta
Copy link

meseta commented Aug 17, 2019

In case this helps, I made a runtime loader for TMX projects for GMS2: GMTiled2

@olivermarshall2
Copy link

Would love to see this as well.

@tibisoft007
Copy link

Hello, can we expect some update regarding this topic? Thanks.

@bjorn
Copy link
Member Author

bjorn commented Nov 24, 2020

If the above linked GMTiled or GMTiled2 don't work, there's another potential tool for moving data between Tiled and GMS2 available here: https://leo150250.gitlab.io/tiledtostudio2/.

@bjorn bjorn self-assigned this Jan 27, 2021
@bjorn
Copy link
Member Author

bjorn commented Feb 2, 2021

I've started to work on a GMS 2 export plugin! The progress can be followed at the pull request #2979. The latest successful builds with this addition can be found at:

https://github.com/mapeditor/tiled/actions?query=branch%3Awip%2Fyy-plugin+event%3Apull_request+workflow%3A%22Build+Packages%22

Since I currently don't have a GMS 2 license I'll need to rely on others to test the result. Please help with testing if you can. The pull request #2979 has a checklist of things done and an incomplete list of stuff still to be done. Please provide any feedback at the pull request.

I'm currently a little undecided whether to try to finish up this plugin before the Tiled 1.5 release or whether to let this be one of the new features in Tiled 1.6. While it would be nice to still include it, reasons to skip 1.5 would be to not delay 1.5 further, to not rush this plugin and possibly to ship in 1.6 along with another feature I'd like to add, which would be project-wide export options.

@bjorn
Copy link
Member Author

bjorn commented Feb 3, 2021

Since I currently don't have a GMS 2 license...

Well, what can I say. Today I was contacted by YoYo Games and they've provided me with a permanent GMS 2 license to help me with developing this export plugin! Thanks a lot, @YoYoGames! 🎉

I've spent today making various small improvements to the plugin, many based on the valuable feedback from @TrunXGIT. I've also committed to ship at least a basic functional version in Tiled 1.5.

@meseta
Copy link

meseta commented Feb 4, 2021

You may not know this, but we discuss and recommend Tiled a fair amount on the Gamemaker discord server (a group run by users), I'd previously worked on GMTiled2, while Gabe (the person who eventually got in touch with YYG for you) worked on the original GMTiled. We're a small but close community. So when @TrunXGIT posted a link to the issue on the discord, we had a quick discussion about how we could help make this happen for you, and thanks to the kind folks at YYG, it seems like we he arrived at a great outcome!

Discord chat

On behalf of GMS2 users, thanks for your hard work on Tiled!

@bjorn bjorn added this to the Tiled 1.5 milestone Feb 4, 2021
@HeadClot
Copy link

Super happy this is coming online for Tiled 1.5. Thank you so much :)

@bjorn
Copy link
Member Author

bjorn commented Feb 12, 2021

I had originally estimated that it would take 2 full days to write this export feature, but in the end it took me 7 days and still left some improvements open for later (like exporting of paths and better handling of creation codes). Of course, that just shows how hard it is to estimate a programming task - or just how bad I'm still at it after all these years...

The export is otherwise pretty full-featured, turning a Tiled tile layer into multiple GMS2 tile layers (one for each used tileset), or falling back to a GMS2 asset layer when features are used that aren't supported by the GMS2 tile layer (like an image collection tileset, tiles with a different size than the grid size or non-orthogonal orientations).

In general, it works pretty similar to the existing GM:S 1.4 export, where objects are exported as view (when their Type is set to "view"), instance (for any other type) or graphic (tile objects without type). Also, almost all properties can be set using custom properties, using generally the same name (and type) as used in the .yy file.

When a background color is specified for the map, a background layer with this color is created.

As soon as the new export plugin is documented I'll push a new development snapshot and allow for a few days to give feedback before making the Tiled 1.5 release. Those who want to try the plugin now already can use the artifacts from last successful build of the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug. help wanted Issues I'd love for somebody else to help out with!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants