How to use Xcode generated sprite atlas in Tiled

Hello,

First of all, thanks for this great tool.

Complete noob in game dev.

I want to create a map with Tiled, using the same texture atlas as the one automatically generated by XCode.
Is there a way to directly import a texture atlas from Xcode to Tiled ?

Thanks

ccl

I don’t know what kind of atlas Xcode generates, but atlasses come in many forms so Tiled generally stays out of that process. I think the same guidance applies here as for other texture atlas tools like TexturePacker:

It’s not possible to use the Xcode atlases. For one, Xcode generates them anew on every change to images, which means the order of tiles could change at any time, breaking your existing tilemap designs. Plus Xcode also rotates tiles to better fit them into the texture, and it may even use a non-uniform spacing/margin.

AFAIK TexturePacker has a mode that guarantees that tiles in the atlas will not change order, and it can definitely prevent rotation and use a fixed spacing/margin.

My main advice remains, that you should generally aim to use the generated sprite atlas as an abstracted optimization and not as something that is explicitlly included in your content editing workflow. It keeps things simple for tools like Tiled, encourages automation rather than manual packing and does not require compromises.