Sprite Sheet various sizes

I am new to Tiled and I am not sure how to best handle sprite sheets with various sized sprites. I understand that I can load them individually via different files but I thought best practice was to keep them together on a single sprite sheet.

Here is an example of a sprite sheet with different sized sprite:

Any suggestions on how best to approach this?

Currently Tiled has no way to work directly with such images, since there is no consistency in their organization. You’d have to either split it all up into individual tiles and then put them in an Image Collection tileset, or reorganize the original image such that all objects are aligned to for example a 32x32 or 16x16 grid.

As for the “best practice” to keep them together, I assume you mean for rendering performance. In that case, you’ll probably get best performance by using an Image Collection tileset in Tiled, but packing those images into a texture atlas. In your game, you’d use the image names to find their location on the atlas and then render them from there. You’ll get more efficient memory usage that way then when using the original image, and you could even leave unused images out of your texture atlas or make an optimized atlas for each of your maps so everything can be rendered in a single draw call.

See also:

1 Like

Many thanks for the guidance Bjorn. Kudos on a great tool btw

1 Like