[BUG]Picking up morphs with the hand.

Karl Ramberg karl.ramberg at chello.se
Fri Aug 8 08:04:31 UTC 2003



Andreas Raab wrote:
> 
> Hi Daniel,
> 
> > Any idea why the damage recorder isn't being used? that does some
> > merging.
> 
> DamageRecorder could be used here but its strategy is somewhat questionable
> for the particular case in question. DamageRecorder needs to assume that we
> may have lots and lots of tiny rectangles coming along and will aggressively
> merge stuff even at the expense of larger overall areas to redraw. That's a
> reasonable strategy for arbitrary morphs but in the case of the hand we know
> that the hand is going to redraw pretty much everything, e.g., a few large
> instead of lots of small areas. If, for any reason, we have computed a
> relatively large list of damage for the world, we may forceToScreen even
> larger portions when you try to merge the hand damage. For this situation,
> the code I posted is more adequate as it will not introduce larger areas and
> be accurate (at the assumption that hands generate few damage areas which is
> generally true).
> 
> > gives me back 20%, on
> >
> > TimeProfileBrowser onBlock: [5 timesRepeat: [ActiveHand grabMorph: s .
> > World doOneCycle. ActiveHand dropMorphs. World doOneCycle.]]
> >
> > 20% isn't much, though.
> 
> 20% is quite a bit more than I would have expected ;-) See my other post.
> 
20% speedup on grabbing and dropping sounds nice to me. Morphic needs
all the help it can get and minimizing sluggishness is a good thing.
I tried Andreas code and there are no selector named allAreasOutside:.
I replaced with areasOutside: and that crashed horribly. 
What is the intended behavior of allAreasOutside: ?

Karl



More information about the Squeak-dev mailing list