[squeakland] Can a Morph / (etoys player) follow a connector path ?

Harness, Kathleen kharness at illinois.edu
Sun Mar 18 09:23:51 EDT 2012


Hi Karl,
First, thanks for all your work you making this new release!

Thanks for the example project idea. It is very nice. One of the things that first interested me in Etoys was that it would carry ideas in many ways and would be difficult for children to outgrow. Whenever I see expert examples, I realize again how deep it is and how fine.
Regards,
Kathleen
________________________________
From: squeakland-bounces at squeakland.org [squeakland-bounces at squeakland.org] on behalf of karl ramberg [karlramberg at gmail.com]
Sent: Sunday, March 18, 2012 7:35 AM
To: Steve Thomas
Cc: squeakland at squeakland.org
Subject: Re: [squeakland] Can a Morph / (etoys player) follow a connector path ?

I made a version of this here
http://squeakland.org/showcase/project.jsp?id=11816

Click in the green playfields to create markers.

Start the plane with the Go button

Karl

On Fri, Mar 16, 2012 at 10:24 PM, Steve Thomas <sthomas1 at gosargon.com<mailto:sthomas1 at gosargon.com>> wrote:
Mike,

No high level method I know of to track a connector. But there are many wonderful things inside Etoys which I have not yet discovered.

So lets break down the game a bit.  You have to detect clicking on a particular plane (this can be done setting a script for each plane to execute on a mouse down event).
Then you have to "draw a path to the target" and that path is not always a straight line.
And you have to make sure the plane you clicked follows the path you drew for it, not another planes path (assuming you are making a multi-plane game).

Well lets start simple with a single plane version.

First let's assume only a plane and target.  When you click on the plane you can get a script to execute by setting the scripts "when to run" to "Mouse down" (in the script editor, click on normal and you will get a list of options).
[Inline image 1]

Now once you click on the script you would need to start "drawing the path"
One way to do this would be to create a copy of a "marker" (pick any object you want to use as your marker) and have it follow your mouse movements.  For the script below I created my plane on the page of a book (I like doing this as I can duplicate pages for different versions as I play and explore).  The script below was started with the "mouse down" on the plane from the script above.

[Inline image 2]

Then when you click again you would want to stop the marker from following the mouse.
[Inline image 3]

Now of course you would need to create copies of these markers and keep track of them for each plane (a holder would be a good way to keep track of them). And to show the path you could use connectors connecting your plane to the markers.

There are a number of more "advanced" Etoys features you would need to use but if you can play around with the above and want to go further, please send more questions to the list and we'll be glad to help.

Stephen

On Fri, Mar 16, 2012 at 1:09 PM, Mike Stramba <mikestramba at gmail.com<mailto:mikestramba at gmail.com>> wrote:
I'd like to do something similar to this game in Squeak / Etoys

http://www.gamenet.com/game/air-traffic-chief/

I.e. using a connector, having the motion of a morph follow that
connector, as the connector is moved while the morph is moving.

I see the demos in Etoys of   a "car following a road", but they seem
to be tracking a particular color, and continually turning left or
right (which is ya, basically what any path finding program is gonna
have to do internally, I guess).

Wondering if there is a "high level"  / class  / etoys .. method etc,
to track a connector

Mike
_______________________________________________
squeakland mailing list
squeakland at squeakland.org<mailto:squeakland at squeakland.org>
http://lists.squeakland.org/mailman/listinfo/squeakland


_______________________________________________
squeakland mailing list
squeakland at squeakland.org<mailto:squeakland at squeakland.org>
http://lists.squeakland.org/mailman/listinfo/squeakland


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/squeakland/attachments/20120318/4884807a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 2.png
Type: image/png
Size: 13038 bytes
Desc: Picture 2.png
URL: <http://lists.squeakland.org/pipermail/squeakland/attachments/20120318/4884807a/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 3.png
Type: image/png
Size: 10613 bytes
Desc: Picture 3.png
URL: <http://lists.squeakland.org/pipermail/squeakland/attachments/20120318/4884807a/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 1.png
Type: image/png
Size: 10484 bytes
Desc: Picture 1.png
URL: <http://lists.squeakland.org/pipermail/squeakland/attachments/20120318/4884807a/attachment-0005.png>


More information about the squeakland mailing list