So far, I've created plenty of dirty, messy algorithms and I have no confidence that any of them is robust.
I am working on a multi-move animation controller. By multi-move I mean one which allows multiple things to move at different times, times probably overlapping so multiple things can move at once. (move = translate, rotate or scale; more for the camera).
Here's where I am: there exists a single Conductor. Things that implement an act()
method are Actionables. Each Actionable instance registers a desired start and stop time with the Conductor. During the specified time, the Conductor calls each Actionable instance every frame of the movie.
Lets say that these are the Actionables and their desired start and stop seconds:
These are the seconds during which the conductor will be calling their act()
methods:
As we want the conductor to absorb as few clocks as possible, I've created a Call class. Each Call has a stop time and a list of Actionables to call. This is the list of Call objects:
The simple, clean algorithm for going from picture 1 to picture 3 is evading me.