Hi o11c,
Thanks for sharing thoughts about this.
- the requested time delay between tiles. Milliseconds seems to be a common unit.
the time delay for every single frame. I'm still not convinced this is useful.
I, for one, will need the time to be specified for each frame, so I'd like to see this in.
The millisecond unit is indeed a good choice in term of animation time for a game, IMHO.
- the number of frames before it repeats. At a minimum, this *could* be inferred from the width of the tileset, but that does limit flexibility. However, it *would* make a good default when adding an animation.
- the exact frame order. TMW does this as a sequence of individual properties, but it might be better as one property separated by commas (assuming there is an appropriate GUI).
Since I'll need each frame times and will need to specify as well the frames order (one frame could be reused several times with a different delay, right?), I'd be all for keeping the frames as subtags, and parse their each single properties.
The GUI for this should include common repeat styles (forward+restart and forward+backward+restart), as well as the ability to loop arbitrary subsequences. It is easy to go from high level constructs to the frame sequence, but might be harder to go from the frame sequence to the higher-level construct. So, it *might* be beneficial to actually store the high-level construct.
A GUI permitting to look at the animation could be cool, indeed. Maybe we shouldn't ask for full-fledged animation editor in the first go, though. (The amount of work would increase intensively). But I agree something showing the animation looped or not would be enough in the first place.
a boolean flag for an animation to terminate on the last frame instead of repeat. This only makes sense if an animation has a defined "start" and "end" time, which is likely to be engine-dependent so needn't be implemented in Tiled.
I don't actually remember but I thought terminator frames were implemented in mana/manaplus. A flag telling whether the animation should loop would be good indeed.
Packing all that in a starting format spec, here is an example. Feel free to point out whatever is needed:
tile_id, duration : 0 or positive integers
loop : boolean
N <animation tag>, containing 0-N <frame>
if no <frame> is given, then no animation, fallback to the original tile.
Code: Select all
<!-- This could be placed after the tile layer definition, for instance. -->
<animation tile_id="3" loop="true"> <!-- The tile id placed in the map view -->
<frame tile_id="4" duration="75" />
<frame tile_id="5" duration="150" />
<frame tile_id="4" duration="75" />
<frame tile_id="6" duration="75" />
<!-- ... -->
</animation>
Note that the original tile_id (3) isn't used in the animation.
This is done on purpose in case the map maker wants to point out animated tiles with a special one in Tiled.
Regards,