Separate, non-grid-based image type
When working with entities, you often do not have them as a tileset, but actual separate images. Loading such images into LDTK leads to a lot of issues:
- They are expected to be square or some similar shape, so you can assign grid size to them correctly
- If you have a lot of idividual sprites as separate tileset - LDTK takes AGES to load the project. Like, 100 64x64 images takes around 15 seconds to load for me. From my tests, it gets slower with each image it loads - probably, garbage collector issues? Tileset must be referenced by entities for this issue to occur.
- Those images are, normally, not square. And, when viewing in the entitiy list - they appear distorted
- Such images usually have very specific origin points (usually at the bottom, but not always exactly there)
So, I suggest adding a new resource type called Sprite.
- Asset is a single image + origin point x/y values. Maybe a tag.
- When assigned to the entity, it will be displayed full size at the entity's anchor point, aligned by sprite's origin (anchor's position = origin's position visually).
- When scaling, sprite's origin will stay at entity's anchor point.
- Allow negative scaling so such entity can face opposite side (optional)
I can see this implemented in 2 ways:
- There is a separate tab in the project where you can load sprites.
- You can add a new "tileset" type that is, basically, a collection of sprites - Atlas. You create a new atlas, then you create new sprites inside of it. Having such a thing may be convenient for organization.
Considering LDTK uses uid values to reference any type of assets, it should not really require rewriting entity's json format. But, when drawing the level or editor, it should check if you're refering a tileset or a sprite.
Pretty sure this is a duplicate for https://github.com/deepnight/ldtk/issues/68
Would also love to have this feature, it says it's on "the roadmap" not 1.6.0 so I assume we wont see it this year unless you create your own PR for it.
No, that one looks like it's about drawing normal sprites on a special layer. In this one I want to be able to use sprites as images for entities.
Ha I see what you mean, yes, we also encountered this inconvenience, would definitely be a nice feature to add.