Etoy issues

Jahanzeb Sherwani jahanzeb at lums.edu.pk
Fri Jan 24 01:19:04 PST 2003


Hi Andreas,

I see what you mean about clean scripts. I tried it:

http://www.squeakland.org/project.jsp?http://ravi.lums.edu.pk/sherwani/4-Sen
sor Maze.002.pr

but it still doesn't work.

Some more technical questions that I hope you can answer:

1) Kids want to use the keyboard to control their creations. What do I tell
them?

2) How does one use the max function? suppose I want to set xspeed <- max
of xspeed,-xspeed) ... how do I do this?

3) When publishing a project (why not save/load instead of publish/find?),
due to the lossy compresion on the graphics, the color values I've put into
the 'color sees' option don't work out, especially since i've resized the
image. Whats the easiest way for a child to not encounter this problem?

4) A kid wants to know how to make chess, I want to know how to make
tetris. Is there any way we can see and understand the way these objects
were created for Squeak so that we can make them ourselves too?

5) Is there any way to edit a script in text mode and then see the changes
come up in tile mode, or is it that once you've left tile mode and made a
change, there's no going back?

6) One kid wanted to make pinball, and initially set it up so that a ball
goes up in a playfield, hits an object, and bounces off it. How do you make
objects bounce off other objects the way they bounce off playfield borders?
He made it turn 180 but that only works if you make it hit the object head
on. I couldn't figure out any easy way of making this happen.

Any suggestions would be greatly appreciated!

Jahanzeb


At 11:54 PM 1/23/2003 +0100, you wrote:
>Hi Jahanzeb,
>
>This problem can be very cleanly solved by separating out the individual
>cases and write a script for each single one. Here is an example:
>
>batman collideTop <ticking>
>Test	batman's top color sees maze's color
>  Yes batman's y decrease by batman's y speed
>
>The above handles the case of colliding with the "top edge of batman" in
>which case it takes the current y speed and applies it inversely to keep
>batman within the maze (otherwise you would be able to go through the
>walls). You can write similar scripts for bottom, left, and right. 
>
>The above still isn't perfect because you will find that batman is going to
>"vibrate" when he hits a wall. We should reset the speed when we bump into a
>wall so that batman isn't going to repeatedly try to run into the wall,
>e.g.,
>
>batman collideTop <ticking>
>Test	batman's top color sees maze's color
>  Yes batman's y decrease by batman's y speed
>      batman's yspeed <- 0.
>
>The nice thing about writing individual ticking scripts is that it is easy
>to test them individually and see if they are working correctly. And once
>you got one of them going all the others follow naturally. Also note that at
>this point your control script is really only concerned with the joystick
>control which makes it a lot simpler to read and understand.
>
>Hope this helps,
>  - Andreas
>
>
>> -----Original Message-----
>> From: owner-squeakland at squeakland.org 
>> [mailto:owner-squeakland at squeakland.org] On Behalf Of 
>> Jahanzeb Sherwani
>> Sent: Thursday, January 23, 2003 7:32 AM
>> To: squeakland at squeakland.org
>> Subject: Re: Etoy issues
>> 
>> 
>> At 05:44 PM 1/22/2003 -0800, Alan Kay wrote:
>> >Once this is done, then one only has to realize that a maze 
>> is a kind 
>> >of road ...
>> 
>> I've uploaded a project to the BSS super swiki called 
>> '4-sensor maze'. It's
>> not working as well as it should, so if anyone can improve 
>> upon it, please
>> do so and upload it back. My constraints were that it should be simple
>> enough to make it easy to explain and understand, but 
>> powerful enough to
>> work properly. I don't think this solution meets either of these
>> constraints, but it would be great if someone else can 
>> improve upon it.
>> 
>> Jahanzeb
>> 
>
>
>




More information about the Squeakland mailing list