ID:1903144
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
From what I can tell, right now looping animations all run off of the same global clock. This itself isn't a bad thing, however sometimes having two images with the same animated icon_state being perfectly in sync isn't desirable, and creating a bunch of nearly identical animation states to work around it isn't practical.

It would be nice to be able to specify a tick or frame offset for an image, that would be applied when the animated icon state determines which frame to show.

Using flick() for this purpose doesn't work with animated overlays, and seems like overkill even if it did.
DS actually syncs animations for a good reason, to cut down on unwanted calculations. But I can see how an override is desirable. Flicks and movement will change the time offset, so that movement is always based on when the move started, and also changing icon or icon_state should affect this (at least for fixed-loop animations). In theory therefore it'd be potentially possible to add a delay. Not sure about how desirable it would be as a general thing though.
Couldn't you have a delay var? Everything based on the same global clock, but it delays firing the animation for that amount of deciseconds?
If individual atoms had a nonzero delay, they would by definition no longer be using the global synced animation.
Right now I am working around it by making 10 copies of the animations I need and manually inserting a delay at the beginning of different lengths. It's sort of work intensive and definitely not scalable though.

I was hoping that a simple frame offset (like a phase shift, not a delay) would be a cheap way of accomplishing this for looping animations. I guess I can't know for sure without knowing the details of how animations work.