|
|
Re: The bouncing sound: msg#00188
lang.smalltalk.squeak.beginners
|
Subject: |
Re: The bouncing sound |
Hi Scott,
Scott Wallace wrote:
Of course it's the "fence" that allows this second solution to work.
If your student didn't know about the "fence", I suppose he/she felt
an urge to use "bounce" in an attempt to contend with the situation at
the boundary, and that led to the complications we've seen.
This basically describe the situation. Is there a place somewhere where
the fence is described (other than an email thread)? I know (now) that
the balloon pops up from the playfield option in the World menu ....
This is probably a case where trying things out very early in the
authoring process would have been helpful. Trying out the simple
"forward" script would have revealed that it already worked, with the
only task remaining being to experiment with different values for the
scaling factor to get the best "feel," and hence the siren song of
"bounce" might have been avoided.
I agree with you on this. But at the same time, in the early process of
working with Squeak/E-toys - or really almost any development
environment, there are significant forces other than logical
progression/procedure that come into play. Having said that, what turned
out to be helpful in class was discussion that ensued about the fence
issue. For example: (1) how quickly an explanation for the fence was
available on the list, (2) how flexible features in a development
environment are very different from fixed menu choices in an application
(3) how close to the surface the solution actually was, eg, a menu
choice in playfield, (4) soon to surface shortly - the difference
between Squeak and Squeakland, (5), and discussion of the tradeoffs that
features sometimes bring.
.... One more question that seems to have come up. The student found
today that saving the project in 3.9 (as a PR) doesn't seem to be
reliable. At least that's the report I have. The symptom specifically,
is some of the tiles that trigger on and off scripts don't seem to work
after being saved into a PR file (and then being reloaded). I have no
idea at the moment is this is the inexperience of someone new to Squeak
or if its something else. From the students' experience, saving the
project to a PR file is disabling some scripts whereas saving it in an
image seems to be just fine.
I'm going to follow up on this and see what I can learn ....
Ab,
Mark
Cheers
-- Scott
On Feb 23, 2008, at 4:56 PM, polishookm wrote:
Scott, thanks very much for both solutions (and that great
explanation about the fence).
The solution you've proposed here is pretty much what the student
began with. Except his scaling factor was slightly higher.
I'll see if I can post the project once it's finished.
Ab,
Mark
Scott Wallace wrote:
And here's a very different, and perhaps nicer, one-line solution.
------------------------------------------------------------------------
Cheers,
-- Scott
On Feb 23, 2008, at 2:10 PM, Scott Wallace wrote:
"Bounce" is particularly unsuited to this example, because it
reverses the direction the paddle is "heading" and hence reverses
the motion brought about by "forward" commands. This makes it hard
to retain an intuitive relationship between the joystick and the
motion of the paddle.
FWIW here's a script giving good, or at least intuitive,
joystick/paddle action:
<positionPaddle.jpg>
Cheers,
-- Scott
On Feb 23, 2008, at 5:30 AM, Herbert König wrote:
Hi Mark,
p> That's an interesting observation. Did you, perchance, play
with it to
p> see what a more intuitive (for you) solution would look like? I
had the
thanks for asking, that made me try :-))
p> All suggestions welcome ...
Nearly everything i know about Etoys is from the Squeak video DVD. So
I opened the viewer of the paddle and it has a tile "PongPaddleA's
heading" which jumps between 0 and 180 when bouncing.
So the simple solution would be to add a "PongPaddleA's heading = 0"
to the script. I thought I'd just have to drop the tile onto the
script. But this doesn't work, the script doesn't accept the tile.
This reminded me of several posts on squeak dev that 3.9 is not good
for etoys. So I guess the Thing to do is follow Scott's advice and
use
a Squeakland image.
Dropping the Project onto a 3.8 image doesn't work, this is also
known.
So I redid it from Ground up in my 3.8 image using an arrow as the
pong paddle (guess why). It made the sound but didn't turn on bounce.
There I learned that one has to drag a tile by the arrow to get it
into a script.
Then I tried this in 3.9 and in 3.9 the arrow also didn't turn and
the
the trick with fixing the heading of the sketch also worked.
So I proved my accusations on 3.9 unfounded, Sorry 3.9 :-))
Now drop the one who did (against better knowledge) something the
first time and let the project leader speak up.
What I did with fixing the heading of the paddle in the script was
"an
ugly hack". The price to pay is more uglyness if we ever want to use
"Paddle turn by Joysticks leftRigt" by having to simulate
differential
geometry by "absolute geometry".
So the way to go is find out what makes the Sketch (the inspector
shows the paddle is a SketchMorph) misbehave on bounce. Maybe
there is
a reason and then you should use a wide line as your paddle.
Finally:
- Attached is my changed 3.9 Project. --> Not to the list but private
mail
- Maybe this is off topic here, at least you might get better advice
on the squeakland mailing list (where I'm not subscribed).
- I'd be curious and willing to comment on further development of the
project, maybe by private mail unless somebody here also wants to
follow this.
Cheers
Herbert mailto:herbertkoenig@xxxxxxx
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
------------------------------------------------------------------------
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
--
Mark Polishook, D.M.A.
Technology Coordinator
Morehead Hall, Rm 132
Center for Academic Advising and Adult Learning
Montclair State University
Montclair, NJ 07043
(973)-655-7114
http://www.montclair.edu/AcademicAdvising/html
polishookm@xxxxxxxxxxxxxxxxxx
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/mailman/listinfo/beginners
--
Mark Polishook, D.M.A.
Technology Coordinator
Morehead Hall, Rm 132
Center for Academic Advising and Adult Learning
Montclair State University
Montclair, NJ 07043
(973)-655-7114
http://www.montclair.edu/AcademicAdvising/html
polishookm@xxxxxxxxxxxxxxxxxx
| |