[Squeakland] Q: Leverage Overlapping Player to Etoys?
Markus Gaelli
gaelli at emergent.de
Mon Jan 5 17:25:39 PST 2004
Hi,
I showed a good friend of mine (a teacher) how to program space
invaders completely with Etoys.
You can try out the result here:
http://www.squeakland.org/project.jsp?http://www.emergent.de/pub/
smalltalk/squeak/projects/petersInvaders.003.pr
We used the common "seesColor" trick for the collision-detection, but
we found it difficult to determine
which UFO was hit by our laser, so I leveraged the existing Smalltalk
Method called "Morph >> morphsInFrontOverlapping:"
to a tile in miscellaneous called: "overlappingPlayer" in Etoys. Here
an exemplifying screenshot:
-------------- next part --------------
Skipped content of type multipart/appledouble-------------- next part --------------
Did we overlook some other way to find out with Etoys which of the UFOS
have been hit by our shot?
If not, should be put it to miscellaneous? Is it a problem that we only
return one of
possible many overlapped players? Is there a better name than
overlappingPlayer?
Should I send the changeset?
Another question: How do you destroy Players with Etoys? Is there
something there and hidden?
We created the bombs of the UFOS by copying the "mother of all bombs".
But we also wanted to
destroy them, if they hit the ground.
I usually end up leveraging this from Smalltalk too, but I have the
feeling, that I am not the only one here...
I guess, you want to protect the innocent from destroying valuable
players by accident, maybe the effect
of a "destroy-tile" should be to stop all scripts and just put the
player in the trash?
Thanks,
Markus and Peter
More information about the Squeakland
mailing list