I ported my morphic app to Etoys and it does indeed work differently (randomly) now each time I bring it up.. The app simulates a simple game with two players taking turns putting their colored blocks (blue and red) upon one of two towers, randomly selected. The game ends when both towers are topped with the same color.
In a playfield, the playGame pseudocode script:
TEST towers topped with same color blocks YES initialize game to starting conditions NO blueAction redAction
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not, are there any plans for one?
Michael
On Thu, Apr 7, 2011 michael rice wrote:
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not, are there any plans for one?
I saw these two posts last year. They might help:
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html
Thanks.
One forgets it's not a real-time simulation.
Michael
--- On Fri, 4/8/11, David Corking lists@dcorking.com wrote:
From: David Corking lists@dcorking.com Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Friday, April 8, 2011, 2:01 PM
On Thu, Apr 7, 2011 michael rice wrote:
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not, are there any plans for one?
I saw these two posts last year. They might help:
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Well, often in Etoys you need a slight shift in perspective to make the solution fit a lot better. Approaches from other systems do not always map well.
E.g., a typical approach to implement PacMan would be to have PacMan object with a script to eat peas. In Etoys it's a lot easier for each pea to have a script checking if it was eaten.
So if you could let us know, in high-level terms, what the intended behavior is, we might be able to come up with ideas how to do that in Etoys.
- Bert -
On 08.04.2011, at 21:40, michael rice wrote:
Thanks.
One forgets it's not a real-time simulation.
Michael
--- On Fri, 4/8/11, David Corking lists@dcorking.com wrote:
From: David Corking lists@dcorking.com Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Friday, April 8, 2011, 2:01 PM
On Thu, Apr 7, 2011 michael rice wrote:
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not, are there any plans for one?
I saw these two posts last year. They might help:
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html
Delay can be accomplished with "follow path."
1) Put an ellipse morph at 100@100 2) Give it a path from present location straight up to top of screen. 3) Create script named "delay" for ellipse Ellipse do menu item follow existing path Ellipse x <- 100 Ellipse y <- 100 4) Put a rectangle morph at bottom center of screen 5) Create script for rectangle Ellipse delay Rectangle forward by 5
Click on ! to execute rectangle script. Ellipse follows path and returns to 100@100, delaying move of rectangle.
Michael
--- On Sat, 4/9/11, Bert Freudenberg bert@freudenbergs.de wrote:
From: Bert Freudenberg bert@freudenbergs.de Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Saturday, April 9, 2011, 6:33 AM
Well, often in Etoys you need a slight shift in perspective to make the solution fit a lot better. Approaches from other systems do not always map well. E.g., a typical approach to implement PacMan would be to have PacMan object with a script to eat peas. In Etoys it's a lot easier for each pea to have a script checking if it was eaten. So if you could let us know, in high-level terms, what the intended behavior is, we might be able to come up with ideas how to do that in Etoys. - Bert - On 08.04.2011, at 21:40, michael rice wrote: Thanks.
One forgets it's not a real-time simulation.
Michael
--- On Fri, 4/8/11, David Corking lists@dcorking.com wrote:
From: David Corking lists@dcorking.com Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Friday, April 8, 2011, 2:01 PM
On Thu, Apr 7, 2011 michael rice wrote:
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not,
are there any plans for one?
I saw these two posts last year. They might help:
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html
-----Inline Attachment Follows-----
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
That just freezes the world during the path following. Which I would consider a bug - in the Etoys image, path following happens simultaneously with all other animations.
Adding such a delay would be trivial, just have a textual script with something like "(Delay forSeconds: 1) wait". But that would not be a substitute for a real "wait" tile. It does not just stop the script it is in, but *every* script in the whole system.
- Bert -
On 10.04.2011, at 16:34, michael rice wrote:
Delay can be accomplished with "follow path."
- Put an ellipse morph at 100@100
- Give it a path from present location straight up to top of screen.
- Create script named "delay" for ellipse Ellipse do menu item follow existing path Ellipse x <- 100 Ellipse y <- 100
- Put a rectangle morph at bottom center of screen
- Create script for rectangle Ellipse delay Rectangle forward by 5
Click on ! to execute rectangle script. Ellipse follows path and returns to 100@100, delaying move of rectangle.
Michael
--- On Sat, 4/9/11, Bert Freudenberg bert@freudenbergs.de wrote:
From: Bert Freudenberg bert@freudenbergs.de Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Saturday, April 9, 2011, 6:33 AM
Well, often in Etoys you need a slight shift in perspective to make the solution fit a lot better. Approaches from other systems do not always map well.
E.g., a typical approach to implement PacMan would be to have PacMan object with a script to eat peas. In Etoys it's a lot easier for each pea to have a script checking if it was eaten.
So if you could let us know, in high-level terms, what the intended behavior is, we might be able to come up with ideas how to do that in Etoys.
- Bert -
On 08.04.2011, at 21:40, michael rice wrote:
Thanks.
One forgets it's not a real-time simulation.
Michael
--- On Fri, 4/8/11, David Corking lists@dcorking.com wrote:
From: David Corking lists@dcorking.com Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Friday, April 8, 2011, 2:01 PM
On Thu, Apr 7, 2011 michael rice wrote:
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not, are there any plans for one?
I saw these two posts last year. They might help:
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html
Yeah, I was surprised (shocked?) it didn't work in Etoys. Oh, well...
MIchael
--- On Sun, 4/10/11, Bert Freudenberg bert@freudenbergs.de wrote:
From: Bert Freudenberg bert@freudenbergs.de Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Sunday, April 10, 2011, 1:49 PM
That just freezes the world during the path following. Which I would consider a bug - in the Etoys image, path following happens simultaneously with all other animations. Adding such a delay would be trivial, just have a textual script with something like "(Delay forSeconds: 1) wait". But that would not be a substitute for a real "wait" tile. It does not just stop the script it is in, but *every* script in the whole system. - Bert - On 10.04.2011, at 16:34, michael rice wrote: Delay can be accomplished with "follow path."
1) Put an ellipse morph at 100@100 2) Give it a path from present location straight up to top of screen. 3) Create script named "delay" for ellipse Ellipse do menu item follow existing path Ellipse x <- 100 Ellipse y <- 100 4) Put a rectangle morph at bottom center of screen 5) Create script for rectangle Ellipse delay Rectangle forward by 5
Click on ! to execute rectangle script. Ellipse follows path and returns to 100@100, delaying move of rectangle.
Michael
--- On Sat, 4/9/11, Bert Freudenberg bert@freudenbergs.de wrote:
From: Bert Freudenberg bert@freudenbergs.de Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Saturday, April 9, 2011, 6:33 AM
Well, often in Etoys you need a slight shift in perspective to make the solution fit a lot better. Approaches from other systems do not always map well. E.g., a typical approach to implement PacMan would be to have PacMan object with a script to eat peas. In Etoys it's a lot easier for each pea to have a script checking if it was eaten. So if you could let us know, in high-level terms, what the intended behavior is, we might be able to come up with ideas how to do that in Etoys. - Bert - On 08.04.2011, at 21:40, michael rice wrote: Thanks.
One forgets it's not a real-time simulation.
Michael
--- On Fri, 4/8/11, David Corking lists@dcorking.com wrote:
From: David Corking lists@dcorking.com Subject: Re: [Newbies] Re: Randomness + Pause/Delay? To: "A friendly place to get answers to even the most basic questions about Squeak." beginners@lists.squeakfoundation.org Date: Friday, April 8, 2011, 2:01 PM
On Thu, Apr 7, 2011 michael rice wrote:
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not,
are there any plans for one?
I saw these two posts last year. They might help:
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005888.html
http://lists.squeakland.org/pipermail/etoys-dev/2010-October/005887.html
-----Inline Attachment Follows-----
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Sound interesting is the Etoys project posted anywhere?
On Thu, Apr 7, 2011 at 5:47 PM, michael rice nowgate@yahoo.com wrote:
I ported my morphic app to Etoys and it does indeed work differently (randomly) now each time I bring it up.. The app simulates a simple game with two players taking turns putting their colored blocks (blue and red) upon one of two towers, randomly selected. The game ends when both towers are topped with the same color.
In a playfield, the playGame pseudocode script:
TEST towers topped with same color blocks YES initialize game to starting conditions NO blueAction redAction
But the two scripts, blueAction and redAction, in sequence, appear to happen simultaneously. Is there a delay mechanism, like a marktime tile, that could separate two scripts by a specified number of ticks? If not, are there any plans for one?
Michael
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
beginners@lists.squeakfoundation.org