touchesA: (Does anyone think it works?)

Bob Arning arning at charm.net
Tue Jan 29 18:58:34 UTC 2002


On Tue, 29 Jan 2002 18:34:20 +0100 Karl Ramberg <karl.ramberg at chello.se> wrote:
>Bob Arning wrote:
>> 
>> Rik,
>> 
>> The *feature* probably overlooked is that this only works for SketchMorphs and I'm gessing (Star) is a StarMorph. What it will do is something like
>> 
>>         paint a blue star freehand
>>         name it "bluestar"
>> 
>>         some script can change its object's appearance by saying "foo look like bluestar"
>> 
>>         some other script can say "bar's touchesA bluestar" and you should get a true if foo overlaps bar.
>> 
> 
>Maybe the test should work on all morphs( e.g. the rendered form of each
>morph =
>to avoid this confusion and have it work as a general collition
>detection 
>for the etoy scripting ?
>
>All those kids making all those games need it :-)

Well, probably, but one of my main goals here was to make something reasonably fast for uses like the epidemic etoy. The existing colorSees was just too slow to be useful in this case and that's because it *does* render each morph to see if it contains a particular color in a particular place. Possibly more useful in the general case would be a "touches" variant that queried some attribute/property of each morph.

Cheers,
Bob



More information about the Squeak-dev mailing list