phaser-tiled icon indicating copy to clipboard operation
phaser-tiled copied to clipboard

separate terrain files with Tiled

Open seiyria opened this issue 7 years ago • 6 comments

Tiled 1.0 supports terrain files that are separate from everything else (reusable) and are in a tsx (xml-based) format. It would be nice to have support for this!

seiyria avatar Jun 01 '17 02:06 seiyria

I think you mean separate tileset files, not terrain files.

englercj avatar Jun 01 '17 13:06 englercj

Perhaps - I'm new to it as of recent. Either way, having support would be nice, otherwise you have to embed them into the map and essentially copy-paste that map, which is the solution I settled on but eventually I'd like to move away.

seiyria avatar Jun 01 '17 13:06 seiyria

You could also just export as JSON and it inlines it for you. I probably won't be adding this feature anytime soon in this lib.

englercj avatar Jun 01 '17 13:06 englercj

Yes, but I don't want to inline it because then it's not reusable or independently editable. Right now, if I make a change then I have to make it in every map I use it in - this is particularly a nuisance when you have 200+ maps that might use it. Having it independent means I don't have to do that, nor do I have to bloat the size of my map with all of the terrain settings I have per tileset.

seiyria avatar Jun 01 '17 13:06 seiyria

Yes, but I don't want to inline it because then it's not reusable or independently editable

I think you misunderstood. Keep it separate and edit it, then when you are ready to use it in game export it as JSON for consumption there. Keep your source that you edit as TMX/TSX and what you use in the game is JSON. You can script this in your build process.

I understand the benefit of having it load TSX separately, I just don't have time to implement support right now. I am accepting PRs though.

englercj avatar Jun 01 '17 13:06 englercj

That's ok, I just wanted to get the issue in the tracker.

Yes, I understand what you're saying, but having it be part of the build process was not really something I wanted, and Tiled does not offer the ability to do it on save on its own.

seiyria avatar Jun 01 '17 13:06 seiyria