At 15:55 -0800 2000_12_16, Kerry Thompson wrote:
>For performance, I used globals for the floater's position and
>direction, because it was faster for the other objects to access a
>global than to do a sendAllSprites from the floater.
On a technical not I'd just like to say that I think this comparing
apples to telephones. ;-)
It might be true that you see a performance difference in your
specific system by making some property globally public, and having
other objects check that property at will, rather than broadcasting
the data to a list of clients. But bringing #sendAllSprites in to the
equation is just confusing. "sendAllSprites" is slow because you
access other objects through a multiple inheritance relation to a
sprite-object. What would be a fair comparison would be to use <call
#mMethod, plistOfBehaviors]>, that would be direct communication
between the involved parties, as your global scheme is. Not need to
bring sprites into to picture as a messagepath for objects, in a
performance critical situation.
That is one of my pet peeves, and yes it has also been seen strafing
around, but I'll just reiterate: "sendAllSprites" is great for
picking up object references at initialization, typically from
"beginsprite" or "prepareFrame" events. But at the critical
iterations the objects should address each other directly.
And yes, having mutual object references introduces a certain class
of challenges, but that can be dealt with.
Regards, Jakob
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]