[Golist] update event for sequence / playablegroup?

Sebastian Weyrauch go at tweego.org
Mon Mar 24 00:02:35 PDT 2008


Ok, I understand the problems. I'm not sure what's better: The alternative
or leaving this away.

If it is not to complicate, you can implement this, else: let it be :)

 

 

Von: golist-bounces at goasap.org [mailto:golist-bounces at goasap.org] Im Auftrag
von Moses Gunesch
Gesendet: Sonntag, 23. März 2008 23:00
An: Mailing list for the Go ActionScript Animation Platform
Betreff: [Golist] update event for sequence / playablegroup?

 

Thanks for the feedback on the cycles design Sebastian...

 

Will there also be an update event for the whole sequence?

 

You mean a pulse-based update event? 

I don't know, and I'm not really sure it's feasible to be honest. :(

 

 

Here are the problems involved:

 

1. Typically you don't want a group's UPDATE to fire until all children have
updated first. Say you're running a complicated sequence with lots of
parallel groups of tweens – whatever your update listener is doing, you
normally don't want to end up with a case where only some of the child
tweens have updated when your event fires or your code can't check each
child's position accurately.

 

2. Syncing is really complex.

Any IUpdatable can specify its own pulseInterval so it's complicated... what
if one tween has a pulse of 33 and another has a pulse of 100? By default
the group wouldn't fire update until the 100 pulse completed – so now the
tracking has to not just count child updates, it has to track exactly which
children have updated too. 

 

3. SequenceCA adds more complexity.

SequenceCA tracks "trailing tweens" in a private group, which would have to
be factored into this system. So over all, an accurate UPDATE event would
require really quite a bit of extra code in the core classes.

 

4. Events are slow.

LinearGo gets around this by not firing events unless there are listeners
for them. Update events are worst, they truly do affect performance. I'd
like to avoid a situation where every child tween has update events
subscribed in groups. Callbacks are slightly faster but it's still an issue.

 

-

 

Here's an alternative:

 

We could subclass addEventListener() in PlayableGroup and SequenceBase and
instantiate a very simple private IUpdatable instance when UPDATE is
subscribed. This instance could accept an update callback and be used to
fire the UPDATE event from the group or sequence. 

 

The docs would have to mention though, that this UPDATE would not
necessarily be synced with child items, and may fire before all items have
updated.

 

-

 

Thoughts? Sorry this is such a pain but, as you can see there are reasons
why it's omitted. :)

 

-m

 

 

On Mar 23, 2008, at 2:58 PM, Sebastian Weyrauch wrote:





Hi,

think this is a good idea. A  good and tidy structure is more important than
a "easier" assignment.

 

Besides my question in the last mail:

I read you implemented a pause and resume event in 0.4.5. For the whole
sequence and the single steps, right?

Will there also be an update event for the whole sequence? (I know how to
implemented, but a Go event would be nicer)

 

sebastian

 

 

 

Von: golist-bounces at goasap.org [mailto:golist-bounces at goasap.org] Im Auftrag
von Moses Gunesch
Gesendet: Sonntag, 23. März 2008 19:18
An: Mailing list for the Go ActionScript Animation Platform
Betreff: [Golist] cycles design continued...

 

Here's one more little puzzle piece on this: 

 

I'm thinking that sometimes people might want to repeat tweens from the
start, not cycle them back and forth. 

 

Since this gets pretty elaborate and clutters LinearGo's code quite a bit,
it might be prudent to create some kind of cycle handling class that could
be instantiated by the tween on start if cycles isn't 1..?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080324/8a1b9524/attachment-0001.html 


More information about the GoList mailing list