englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.
MIT License
290 stars 31 forks source link

separate terrain files with Tiled #71

Open seiyria opened 7 years ago

seiyria commented 7 years ago

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!

englercj commented 7 years ago

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

seiyria commented 7 years ago

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.

englercj commented 7 years ago

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.

seiyria commented 7 years ago

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.

englercj commented 7 years ago

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.

seiyria commented 7 years ago

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.