help with speedy graphics
ambassador at fourthworld.com
Tue Jul 13 19:58:45 CDT 2004
Alex Tweedly wrote:
> At 16:47 13/07/2004 -0700, Richard Gaskin wrote:
>> Alex Tweedly wrote:
>>> The script (see below) uses (tries to use) templateGraphic to set the
>>> size and colour, but this doesn't seem to have any effect. It also
>>> uses lockscreen - but I see each rectangle being drawn one-by-one - I
>>> had expected that with lockscreen set, I would see nothing until all
>>> the rectangles were drawn and lockscreen was set false again.
>> It may be the IDE getting in the way, adjusting those properties on
>> newGraphic. Adding "lock messages" before the loop seems to take care
>> of it.
>> As for the lockscreen issue, I believe that's a known bug in the IDE;
>> you should not see that in a standalone or if the IDE is suspended.
> Cool - thanks.
> Adding the lock messages made this script OK - all the rectangles appear
> at the same time; but the clean-up script that deletes all these
> graphics when I'm done with them is problematic, even with lock screen
> and lock messages. Suspending the dev tools makes it faster - but it
> still does the rectangles one at a time.
> But even with this improvement, it's un-usably slow.
It's pretty fast here, but I'm using a different IDE.
But here's a tip I got from Geoff Canyon: you could use one polygon
object, setting the points in script. If you have blank lines in a set
of polygon points the resulting object will have discontiguous regions.
Geoff used that technique to make an Asteroids-style game, and
everything on screen (spaceship, asteroids, lasers, etc.) were all one
polygon -- and it was amazingly fast.
Fourth World Media Corporation
Rev tools and more: http://www.fourthworld.com/rev
More information about the use-livecode