-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
GDevelop integration #126
Comments
Thanks for opening a ticket. Probably worth mentioning the related ones on the gdevelop tracker: LED bundling in GD pixi-tilemap rendering - tiled files request/pr on GD |
Just chiming in an update here for @deepnight that @blurymind fully implemented Pixi-tilemap into GDevelop. We're having some conversations around LDtk bundling, didn't know if you wanted to peek at 4ian/GDevelop#2002 to see if the info there makes sense? Because Pixi-Tilemap only supports Tiled JSON (rather than TMX), unless you also add the ability to export to tiled formatted json in LDtk (which I could imagine might be a big lift), it's sounding like they'll need to do some kind of interpreter in the engine. Does that sound right? |
That would be amazing 😍 I forgot to update this thread but you can pass a path to a ldtk file to open it automatically, and even add a level UID to open some specific level. |
@deepnight If you have any insight you can provide there (or if there is something that could be done to transcibe the json formats more easily), your post would be greatly appreciated. I'm likely to post a bounty to get this implemented, but if a bounty on both sides would help (if the json transcribe is possible, but the time is harsh), I could probably do that too. 😄 |
Perhaps I need to clarify a bit about pixi-tilemap. The truth is that it doesnt support parsing any json formats out of the box. The reason this works in gdevelop is because I wrote a custom parser that gives it the tiles in the format it expects. Pixi-tilemap only knows about rendering a tilemap and you have to even manually create its tileset in a way that it can stomach from the atlas. You can see how that is done in the helper class The plan from my point of view is to write a similar parser for the ldtk json format - reason mainly being that ldtk can only load/save the xml (tmx) tiled format and gdevelop doesnt see that as a resource type- it only sees json. Now the reason we wish we could embed it as a react component is to integrate it as smoothly as possible with gdevelop - not just as an external editor like piskel is. There is another challenge to overcome and that is resource dependencies. A map created in ldtk can have several tilemaps, which can have several tilesets, which can have several atlases/image resources. |
Thanks for the detail Blurymind. Just for reference incase anyone is watching this thread, I've started a bounty for this: https://www.bountysource.com/issues/93298046-idea-add-new-externral-editor-to-edit-tilemaps-ldtk Although not quite as high as I would like, I'm hoping it drives interest. |
I have started implementing a parser for ldtk files in gdevelop. Issue here |
Follow up of #101, quoting @blurymind :
Yes the more I look into it, the more it makes sense to parse Led's json format sepparately from our tiled json parsing - to keep all of its perks. We use pixi-tilemap for rendering. So the process is we get the json file, parse it and then pass the data in the right format that pixi-tilemap understands
Yes please, that will help a lot for integrating it. We need a way to initiate it with a map by passing the json parsed object or a path to the json file it. We need a way to initiate it with a new document with a specified name and a way to tell it to save its document.
You can see how we have done it for the currently bundled external editors
https://github.com/4ian/GDevelop/tree/master/newIDE/app/public/external
The xxx-main.js file is what is bridging the external editor and gdevelop. For example piskel's
https://github.com/4ian/GDevelop/blob/master/newIDE/app/public/external/piskel/piskel-main.js
We wait for piskel to load (load callback would be helpful too), then we tell it to either open a file that gdevelop sent it or start a new one. We also add a custom header for saving the file or changing the path to save it to.
This only works in the electron version of gdevelop atm - spawning the editor as a modal window.
My hope is that one day we will embed external editors as tabs inside the IDE's react interface instead
Originally posted by @blurymind in #101 (comment)
The text was updated successfully, but these errors were encountered: