Atlas or Tilesource

Hello,

I am enjoying Defold quite a lot, but I am also very new to game development on the whole. I’ve been working on a project, and am having trouble figuring out when to use an Atlas and when to use a tilesource? I’ll list 2 different situations where I haven’t been sure which to use, I would appreciate any assistance others can give me on these, and why 1 is better than the other in each case?

1: A set of assets downloaded from https://www.kenney.nl/assets/roguelike-caves-dungeons, over 400 sprites in the set. They are each in a single image, however separating them into different images is easy. I want to use some of the larger sprite sets that go together as a button’s texture.
TL;DR : 3 by 3 set of sprites combined together in a button’s texture?

2: Wanting to create an environment for the player to interact with and fight enemies on. The same set of assets, but now I want to create a tilemap (I think), this requires that all of the sprites be in a single image, in a tile source, however the spritesheet has a 1 pixel gap between each sprite, meaning I have 16-bit sprites, but the second sprite starts on the 18th X pixel.
TL;DR : Spritesheet with a 1 pixel gap between sprites, wanting to create an environment for the player to operate in?

Any help you can provide is greatly appreciated.

-Spencer

I would probably split these into individual images and put them in an atlas. For me it makes more sense to have sprite images, gui box nodes images (for buttons etc) etc as separate images of varying size in an atlas.

In this case it definitely sounds like a tilemap with a tilesource. The tilesource can specify the number of pixels between each tile using the Tile Spacing option.