ldtk icon indicating copy to clipboard operation
ldtk copied to clipboard

Feature Request: Animated Tiles

Open nion-ne opened this issue 3 years ago • 17 comments

Highly impressed from what's been done already, particularly the elegant UI and how modern everything feels.

Animated tiles is a core feature that is missing for me personally. A parameter to set in milliseconds the rate of each frame would be great as well.

Thanks and keep up the good work :)

nion-ne avatar Sep 29 '20 17:09 nion-ne

I was thinking of creating an issue for this, and I think a potentially more generalized solution is:

  • tileset metadata

Basically, it would be nice if you could add metadata to the tileset and/or individual tiles in the tileset the way you can with entities (Tiled allows you to add metadata to individual tiles). That way you could attach arbitrary metadata to tiles to signal to your engine how to build animations, how long each frame should last, etc.

A few edge cases to consider: image

Note how with some animations each frame fits within a 16x16 tile, but in other animations (such as the door at the bottom), a frame is composed of 6 tiles. The way I do it in Tiled is to designate the top left tile of the first frame of the animation as holding all the metadata for the animation. There may be a more elegant way to accomplish this, however.

RPGillespie6 avatar Sep 29 '20 19:09 RPGillespie6

I like the idea of per-tile custom metadata, especially for roles or workflows that entities don't already fill. I would argue that a benefit of directly supporting animated tiles would be that you could preview the result directly in the editor, whereas a metadata approach would be static.

In either case I think it definitely deserves its own issue raised.

nion-ne avatar Sep 29 '20 19:09 nion-ne

Yes, I agree an animation previewer would be nice as Tiled's is very lacking (as you said, might need to be a separate issue).

And I don't necessarily like the way Tiled does things. I would love if L-Ed could have first-class animation support, where tileset menu has animation building tools (selecting frames, defining timing per frame, etc.) and animation metadata gets its own object inside the tileset object, for example. Per-tile metadata may be a decent workaround/stepping stone to first-class animation support as it's better than nothing (right now it doesn't seem like there is a good way of adding animation metadata to tilesets within L-Ed).

RPGillespie6 avatar Sep 29 '20 19:09 RPGillespie6

I tend to agree that Tiled's animator does feel a cumbersome, it's partly the reason i'm so drawn to L-Ed and how "flowy" it feels in comparison. I guess it depends on desired implementation but I do feel animated tiles to be a core feature of any modern tile map editor and probably ought to be supported as such. hmVYMZ4 Being able to have something like this visible within the editor and able to be paused/played on command would cover 90% of user use cases I feel.

Anything beyond that would be covered under an individual (or group of?) tile's metadata if desired. Happy to contribute to a discussion on that if you want to open an issue :)

nion-ne avatar Sep 30 '20 13:09 nion-ne

Is there any plans on adding animated tile support any time soon? This is basically the only blocker stopping me from using this great tool

Gerolmed avatar Aug 24 '21 13:08 Gerolmed

Right now, animated tiles are not on short-term roadmap (ie. 1.0 version) as I still have a long list of core features to be done, but I'd like to add them at some point though :)

deepnight avatar Aug 25 '21 09:08 deepnight

I'm building an LDtk loader for excalibur.js and the way I'm planning to support animated world prop entities is using a tile array fieldset on the entity. image

Perhaps the tileset could allow fieldsets for each tile to provide the same interface?

airtonix avatar May 21 '22 23:05 airtonix

Hey! Just discovered ldtk and I'm impress it feels very good. At the moment we do use Tiled, and I wanted to try the change.

But, we can't because we handle all our animations/hitbox and all inside Tiled which as a "quite complete" feature to setup animations with points, boxes and whatever.

Is this is a thing planned or not ? Sounds like a lot of work tho.

Thanks

Inateno avatar Jan 05 '23 10:01 Inateno

Hi! For now, animated tiles are not on short term roadmap. If they happen in LDtk, it will probably be only simple animations anyway.

However, I'm not sure of what you were looking for? If you were talking more about paths and moving objects around them, you may use the existing Entity fields, such as Points or References, to define such paths. You will not have visual movements in LDtk, but you will have a way to define them in editor, and use them in your engine.

Could you provide a clear example of the feature you are looking for? :)

deepnight avatar Jan 06 '23 15:01 deepnight

I understand and there is no problem for not being on short term roadmap. I was very pleased and excited by what I tried in 5 minutes.

Here's what I am talking about. image

We can edit many animations and by code getting the array of frames. For each frames we will have the information about boxes or others, also points, this is useful for the gameplay and can be easily edited by any "non-dev" people (it's also more convenient).

Also, after talking about it with the team, maybe the problem is that we use Tiled for "everything UI/visual related" and if we had a dedicated animated/collider editor it would do the job.

But it is quite pleasant and easy for us to use one software for everything with one single file format to read.

Inateno avatar Jan 06 '23 16:01 Inateno

I see, thanks for sharing.

If animations were to be done in LDtk, I would probably only focus on animated tiles, like for example:

  • water tiles,
  • moving grass,
  • etc.

The feature wouldn't be meant to be anything else. So in this case, it wouldn't be a generic asset manager to define visual fx, or player animations.

deepnight avatar Jan 08 '23 20:01 deepnight

Congrats on the 1.5 release. Just wanted to do a check in and see if animated tiles might make it onto the roadmap. I am only really interested in it as you laid out, for water tiles and animated flowers and the like.

digiwombat avatar Jan 10 '24 19:01 digiwombat

Animated tiles would make TLDK the goat for sure. Right now it's still competing with tiled. :o Well, that and collisions that can import into GDev.

KristoferPaul avatar Mar 19 '24 13:03 KristoferPaul

me 2 dreamin for a gdevelop full compatibility (..aehm..collisions)..

RMDB-GD avatar Mar 22 '24 10:03 RMDB-GD

I'd propose this: there's already a way to add an array of tiles to an entity as outlined by @airtonix. However, this has to be done for each and every entity placed on the map. I'd rather have the possibility to pre-populate this tile array in the entity definition, so that all entities placed will have it.

Would that be possible?

TLINDEN avatar Apr 01 '24 17:04 TLINDEN

Also interested in this feature. Not sure how I can efficiently place animated trees, grass, water that are in spritesheet format and also not sure how I would use aseprite json as well but if it can only support spritesheet, that's fine..

PythonCircuit avatar Apr 23 '24 16:04 PythonCircuit