[Grace-core] Animations in Grace

Andrew P Black black at cs.pdx.edu
Mon Sep 2 15:45:20 PDT 2013


Kim,

It's good that you are exploring these interfaces.

Before I read their follow-ups, I was going to make the same suggestions that James, and then Lex, already made: use stepping rather than iteration.

Specifically, either all graphical objector ought to support stepping, or there should be a kind of animated objects that support stepping.  to do things like bouncing balls, you set up a path for the next bounce (a quadratic motion), and then step through that path until it is exhausted.   At that point, you can check to see if the ball has been grabbed, or whether it should bounce again.

As for coordination, once animated object can observe another.   They should not be time-sensitive.  

Generally, I would argue for putting responsibilities inside the object that have them, not having external "god" objects like animator that control other objects.   So cars, frogs and balls are responsible for controlling their own motions.

And yes, I do see the problem: you are trying to use these exercises to motivate loops, whereas the event loop model avoids the need for having loops. 

	Andrew


More information about the Grace-core mailing list