<snip>
The issue probably isn't imaging Lingo so much, as lack of proper
optimisation.
<snip>

Thanks Robert.
I know that my unoptimised code plays a major role in the performance drop.
But before I spend another week rewriting everything from scratch (the
current code can pass of as spaghetti in the eyes of the most discerning
gourmet  :-P    ), I thought I'd get a get a confirmation on whether
imaging really is much faster than sprites.


<snip>
As for your second issue, of detecting click positions, this should
actually
be an area where you can improve on performance, compared with sprites.
Since many of the sprites will be arranged in a uniform grid, you can use a
simple caclulation to determine which one the mouse is over. This saves
doing a bounds check on every sprite, which for a large number of sprites
is
quite time consuming (assuming no other optimisations are used, although
Director probably does optimise this quite a bit anyway).
<snip>

Trapping interactions such as rollovers will be easier in sprites with the
mouseEnter and mouseLeave handlers. I'll need to do a continuous checking
for that with imaging lingo. I'm a little less keen on using sprites since
a cell can contain any number of objects. It's much easier to paste them
all into a single image than having a sprite for each object.

I was also considering a hybrid solution, using imaging and sprites. Each
cell object has its own sprite and image object. I can attach behaviors to
the sprite and let a global appearance manager retrieve the image of each
cell object to paste onto a common bitmap member or the stage. The canvas
bitmap can be placed in the topmost channel without any behaviors attached.
So I don't waste cycles checking for interactivity, while getting fast
drawing routines.


Pranav Negandhi
Software Engineering
Learnet India Limited, Mumbai.
Phone: 91-22-859 8042 Ext: 316
http://www.learnetindia.com




[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to