A helping Hand with Graphics speed and masks

Scott Rossi scott at tactilemedia.com
Tue Feb 26 14:26:01 EST 2002


On Tuesday, February 26, 2002, at 03:49  AM, Matt Denton wrote:

> I'm building a cute little app that displays a series off five animated 
> objects, based on a series of timed events, animating usually only one 
> object at a time.  I'm having a lot of trouble getting the 'speed' up 
> and keeping it consistent.  I know some clever cookies on this list 
> have worked out or found ways to speed up -- sometimes many many 
> multiples of speed increase, such as pencil tool instead of line tool 
> for turtle graphics -- all sorts of graphics and text handling.  I'm 
> hoping someone can help...

> The problem is I have 10 objects, each with masks attached.  Originally 
> I fudged the masks, and tried animated GIFs with but that blew out my 
> project size as I had to 'render off' about 200 animations, ie no 
> masks.  Surprisingly the animated GIFs didn't seem to perform very well 
> anyway...???

FWIW, animated GIFs *should* work fine.  I've built a lot of things you 
shouldn't do with animated GIFs in MC and have had good results.  One 
stack in particular ran between 30 and 40 animated GIFs simultaneously, 
randomly changing frames and positions, and this worked flawlessly on 
Mac systems (but choked on Win98), so I'm not sure why you are 
experiencing problems as you describe.  Your laptop *may* have an old 
video driver (if there is one) or high power optimization settings.

Keep in mind you don't have to rely on the built in frame timing of the 
GIF -- you can use MC/REV to display any frame of the GIF at any time.  
I often purposely set frame timing to 1 fps when building GIFs for use 
in MC/REV so I can see the results on screen when controlled via 
script.  Write your own scripts to manage GIF playback, and take note of 
the following functions:
- frameCount
- repeatCount
- currentFrame

And now that we can control the blendLevel of images, you can play 
animated GIFs translucently, while moving them across the screen and 
controlling their frame rate as desired.  This is a somewhat 
underestimated feature of MC/REV for creating animation that in some 
cases rivals video.

As far as PNGs go, my experience has been that manual image swapping 
(via setting the icon of a button) can achieve almost the same 
speed/performance as animated GIF, even with 8 bit masks, as long as the 
images do not overlap.  As soon as the objects touch, the playback speed 
drops to about 1/2 of normal speed or less.

Kudos must go to the MC/REV teams for providing all this control over 
images.  Now we just need to get some antialiased text and draw objects 
in there... :-)

Regards,

Scott Rossi
Creative Director, Tactile Media
scott at tactilemedia.com
http://www.tactilemedia.com




More information about the use-livecode mailing list