HaxeFlixel / flixel-addons

Additional classes for HaxeFlixel
170 stars 139 forks source link

Autile Import Support for Tiled Importer #417

Open ahmutkadim opened 10 months ago

ahmutkadim commented 10 months ago

I believe the title is self explanatory, I do not know whether we can write feature requests but adding this would really help. It would be beneficial to be able to import autotiling rules from tiled map editor to haxeflixel so that tiles can be updated in runtime if they must. This would help to better integrate tiled and haxeflixel.

Geokureli commented 10 months ago

Does Tiled export it's autotiling rules into levels? I was under the impression it applied the rules before the level was exported. HaxeFlixel generally recommends using LDtk as it has more feature and is more maintained. According to SeiferTim it even supports this very feature

Edit: I'm not seeing anything about it in Tiled's Json Map format

ahmutkadim commented 10 months ago

I believe you can choose to embed tileset file to the tmx or json file while creating it.

Geokureli commented 10 months ago

can you verify this? if you do create a json with this info could you share it here?

ahmutkadim commented 10 months ago

Terrain.json

Geokureli commented 10 months ago

what fields should I be looking for?

ahmutkadim commented 10 months ago

I suspect "tilesets" field and dicts inside it

Geokureli commented 10 months ago

I see wangsets in there, but truthfully haxeflixel doesn't yet support full wangtiles, there were talks about allowing custom autotile methods in FlxTilemap without needing to override FlxTilemap's autoTile methods. that could be a great first step towards wang tiles, and generating autotiling methods from tiled data

If you would like to work on this that'd be great, otherwise I don't think I'll personally have time for this in the near future