How to import animated tilesets?

dtishin

  • *
  • Posts: 89
Hi everyone, how do you import animated tilesets?

There is a functionality for importing animation frames for separate tiles, but not for the whole tilesets, which is really frustrating. E. g. I have a "shorelines" tileset with approx. 40 tiles in Fireside Hero, and each tile has 4 animation frames.

So I had to:
- import 4 sprite sheets (one for each frame) as 4 separate tilesets
- manually copy frames with the same coordinates (e. g. A1) from 3 temporary tilesets into the main tileset.
- repeat for each tile in the set.
- delete 3 temporary tilesets.

This consumes huge amounts of time.
Currently I'm not reimporting my river actors as tiles for this very reason (there are 12 different river fragments, each has 4 orientations, each orientation has 2 frames, and each actor is the size of 2-8 tiles - in total about 150 tiles in the target tileset), even though reimporting would improve my game's performance...

Any suggestions how to optimise this?

Luyren

  • *
  • Posts: 2735
While I don't know about importing entire tilesets with animations for each one, you can add multiple frames at once for each tile set, and you don't need to create separate image files for each one. I reckon that would be easier than your method. Attached a gif showcasing how it is done.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

dtishin

  • *
  • Posts: 89
While I don't know about importing entire tilesets with animations for each one, you can add multiple frames at once for each tile set, and you don't need to create separate image files for each one. I reckon that would be easier than your method. Attached a gif showcasing how it is done.

I know I can import multiple animation frames for each tile, but it doesn't help my case.
In your example you have 3 frames for the same tile in one spritesheet, one after the other. It only works fine when your objects are tile-sized (e. g. for my animated volcanoes, windmills and such).

When I'm drawing a river fragment (or seashore etc) I draw a whole image that spans multiple tiles.
Then I add animation to the whole image (e. g. in the attached example I change opacity of the shorelines).
Even to prepare this asset for import I need to run some sort of a script that would pack all A1 tiles into one spritesheet,  all A2 tiles into another spritesheet, etc. Then I'll have to import 40 spritesheets each containing 3 frames of one tile.
That's not saving a lot of time, plus I don't have a script that would extract sprites with the same coordinates and pack them into animation strips :(

Luyren

  • *
  • Posts: 2735
Any reason you can't use that image you attached to your post as a background with multiple frames instead?
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

dtishin

  • *
  • Posts: 89
Any reason you can't use that image you attached to your post as a background with multiple frames instead?

Ease of level design / flexibility.
I intentionally moved away from the animated background to a tileset to be able to make / edit maps in scene editor, rather than drawing them externally and importing.

Performance.
A 1920 x 1080 background takes four times as much memory as a tileset with 40 tiles.