You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that currently, TileSet only works with grid-aligned spritesheets. You can add a global Margin and Separation but it applies to all rows and columns, not individual tiles.
I downloaded a tilemap spritesheet that contains some padding of a few pixels between big regions, so it would help me to set custom offset/region for certain sprites. In fact, said sprites still use the standard 16x16 size, so I really just need to offset the whole bunch. I can already batch select tiles with mouse dragging, so I'd only need a tool to move the slices around. However, this doesn't seem to be supported even in the low-level parameters, as changing Base Tile > Atlas Coords manually shows that coords must be integer (and to move a slice by a few pixels, less than the grid cell dimension, you'd need fractional coords).
Being able to edit the offset, or even set the whole slice region with pixel precision, would make tile definition much more flexible. But maybe there is a technical reason behind the limitation?
Since the asset provider also offered the sprites as individual PNG, I tried to import them this way in Godot instead of using a spritesheet. However, the workflow is not great.
a. You can drag-and-drop each tile sprite one by one into the TileSet, and the Auto Create Tiles generation pop-up will appear, but you have to press Yes each time.
b. You can btach drag-and-drop all your tile sprites into the TileSet, but then the pop-up won't appear. You'll have to click on every sprite added, then click on the tile in the right part of the panel to generate a tile (in Setup mode).
In both cases, to paint, you'll have to switch to TileMap mode, select the correct tile in the left panel, then also select the (unique) tile in the right panel, to start painting. This is because there is no way to "gather" all the individual tiles under a single collection (as we'd do in other tilemap tools like Unity's).
So, the absence of generic, non-grid aligned spritesheet slicing system and general sprite referencing (i.e. the ability to use a collection of individual sprites instead of multiple sprites extracted from a single spritesheet via slicing in an agnostic way) makes the tile system more limited as we absolutely need a grid-aligned spritesheet (although, if there are only a few extra elements, it is possible to add them in a separate collection but when painting, you'll have to switch for every new collection).
I also means that we cannot import tilemap spritesheets with arbitrary slice regions defined in JSON (e.g. in Pixi.js format). I saw some JSON importer add-on for Godot, but it seems they were all either definiting AtlasTexture with Region (which doesn't seem to work with TileSet, you can drag them as Tiles but nothing appears), or creating a sprite animation that plays with the Region Rect at runtime. So again, not usable for tile maps.
I didn't notice the problem with sprite animations because you can indeed drag a bunch of individual sprites into a SpriteFrames sequence and it will just fill correctly, the same way as if you sliced a spritesheet.
For now, my best bet is to work on the spritesheet and remove the padding, or increase it to a multiple of cell size.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that currently, TileSet only works with grid-aligned spritesheets. You can add a global Margin and Separation but it applies to all rows and columns, not individual tiles.
I downloaded a tilemap spritesheet that contains some padding of a few pixels between big regions, so it would help me to set custom offset/region for certain sprites. In fact, said sprites still use the standard 16x16 size, so I really just need to offset the whole bunch. I can already batch select tiles with mouse dragging, so I'd only need a tool to move the slices around. However, this doesn't seem to be supported even in the low-level parameters, as changing Base Tile > Atlas Coords manually shows that coords must be integer (and to move a slice by a few pixels, less than the grid cell dimension, you'd need fractional coords).
Being able to edit the offset, or even set the whole slice region with pixel precision, would make tile definition much more flexible. But maybe there is a technical reason behind the limitation?
Since the asset provider also offered the sprites as individual PNG, I tried to import them this way in Godot instead of using a spritesheet. However, the workflow is not great.
a. You can drag-and-drop each tile sprite one by one into the TileSet, and the Auto Create Tiles generation pop-up will appear, but you have to press Yes each time.
b. You can btach drag-and-drop all your tile sprites into the TileSet, but then the pop-up won't appear. You'll have to click on every sprite added, then click on the tile in the right part of the panel to generate a tile (in Setup mode).
In both cases, to paint, you'll have to switch to TileMap mode, select the correct tile in the left panel, then also select the (unique) tile in the right panel, to start painting. This is because there is no way to "gather" all the individual tiles under a single collection (as we'd do in other tilemap tools like Unity's).
So, the absence of generic, non-grid aligned spritesheet slicing system and general sprite referencing (i.e. the ability to use a collection of individual sprites instead of multiple sprites extracted from a single spritesheet via slicing in an agnostic way) makes the tile system more limited as we absolutely need a grid-aligned spritesheet (although, if there are only a few extra elements, it is possible to add them in a separate collection but when painting, you'll have to switch for every new collection).
I also means that we cannot import tilemap spritesheets with arbitrary slice regions defined in JSON (e.g. in Pixi.js format). I saw some JSON importer add-on for Godot, but it seems they were all either definiting AtlasTexture with Region (which doesn't seem to work with TileSet, you can drag them as Tiles but nothing appears), or creating a sprite animation that plays with the Region Rect at runtime. So again, not usable for tile maps.
I didn't notice the problem with sprite animations because you can indeed drag a bunch of individual sprites into a SpriteFrames sequence and it will just fill correctly, the same way as if you sliced a spritesheet.
For now, my best bet is to work on the spritesheet and remove the padding, or increase it to a multiple of cell size.
Are there alternatives I am missing?
Beta Was this translation helpful? Give feedback.
All reactions