Can't add tileset from .png

In every tutorial I see, it’s just File >> new >> tileset >> choose name and png >> click “okay”. There is no “okay” button for me, there is only “Save As…”. I’m not trying to save anything, I just want to add a tileset.
The only way to add a tileset for me is to save it as .tmx. But then in my map it is referenced as name.tmx and I need .png.

how it looks in every tutorial: image

how it looks for me : image

My map’s jason, if I save myTiles.png as myTiles.tmx:

 "tilesets":[
        {
         "firstgid":1,
         "source":"myTiles.tsx"
        }],

Since I just started using tiled, it’s really confusing: not sure if I missed something or it’s a bug.

Since you’re storing your map in JSON, note that you could also save your tileset in JSON format. But if you really want the tileset definition to be embedded in the map file (like it used to be at the time the tutorials you’re following were written), then you need to check “Embed in map”. Then you won’t be asked to save it in its own file.

It is important to note though, that your tileset isn’t just its image. At a minimum the tile size information needs to be added, but in addition you can set custom properties on the tileset or its tiles, you can associate collision information, define terrain transitions and set up simple tile animations. As soon as you make more than a single map, it will make sense to share all this information between yours maps by saving the tileset definition separately instead of embedding it in each map.

1 Like

Thank you for your reply, it worked!
I’m fine with embedding tileset definition for now, since I’m just starting with a really simple project.
As for tileset information I understood that it was missing, but Tiled didn’t autogenerate it for some reason when saving my map. After i chose “embed in map” however, Tiled added missing information and now it works and looks like that:

"tilesets":[
        {
         "columns":1,
         "firstgid":1,
         "image":"SquareTile.png",
         "imageheight":32,
         "imagewidth":32,
         "margin":0,
         "name":"square",
         "spacing":0,
         "tilecount":1,
         "tileheight":32,
         "tilewidth":32
        }],
1 Like