A ToonTalk picture touching more than one thing
"Ken Kahn" <[email protected]> Thu, 25 Nov 2004 10:43:51 -0000
| Newsgroups | gmane.education.weblabs.requests |
|---|---|
| Message-ID | <013701c4d2db$a83ae7c0$57f34ed5@ESTLAP05> |
Hi all.
For domains like eco modelling and physics the ToonTalk sensor "Touching
Who?" is frequently used. It has long been noted that it doesn't deal
well situations where a picture is touching more than one thing. Looking
at the code I was surprised to discover that solution had been
implemented about 5 years ago. The solution was buggy but easy to fix
(and fixed in 3.127). The idea is that when you vacuum off what is on
top of the Touching Who sensor you see the next thing that is touching.
To test this I made a robot that made a sound when a rectangle touched a
ball and put it on the back the rectangle. I then arranged for the
rectangle to touch a ball among many other things. Depending upon luck
(actually the Z ordering of the objects involved) the sound occurred or
not. But when I added a robot on the back of the rectangle that did
nothing but vacuum off the top of the Touching Who sensor then the
picture shown on the sensor changed on every cycle and hence the sound
robot ran (but it might have to wait a few cycles to notice that it was
touching a ball).
What is nice about this is that old programs should run the same as
before (assuming they don't vacuum off a touch who sensor -- a check of
the Playground Adventure games showed it still works as before and it is
probably the most sophisticated program using sensors of this sort. It
is only when a robot that vacuums off the top of the Touching Who sensor
does the new behaviour kick in.
I admit this is a bit peculiar that you need to have this robot
vacuuming the Touching Who sensor to deal with multiple collisions but
it is the minimal change to ToonTalk to support multiple collisions. And
there is a story behind it that kids should be OK with.
Comments?
Best,
-ken
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/o1XolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/WebLabs-requests/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/