[Squeakland] Kedama question

Yoshiki Ohshima yoshiki at squeakland.org
Mon Mar 28 11:25:42 PST 2005


  Jerry,

> In the Kedama GasTank example it looks like the ceiling was created by 
> running the oneStep script.  In the Diffusion example, was the wall 
> created in the same way?

  In the diffusion example, dropping a Sketch is much easier.  I could
imagine doing it programatically, however.

> I saw how to drop a sketch to fill the Kedama world with turtles.  It 
> looks like all of the turtles are instances of a single exemplar 
> turtle.  Is it possible to get an exemplar turtle for each color in the 
> sketch?

  No, not at this point.  You could end up with thousands of
exemplars, though.

> This would make it easy to set up specific starting 
> conditions(ie boxes, lines, etc) and let you assign different behavior 
> to instances of each color turtle.

  Yes.  That would be neat.

>  You could drop a sketch in Kedama, get exemplar turtles for each
> color in the sketch, and tell all of the instance turtles of the
> sketch background color to die off.  Or is there a better way to do
> this?

  There is not a "better" way, I have to say, but here are some
suggestions.

  One way is to use "isGrouped" property.  Drop the different pieces
of Sketches into a Kedama world, and create a few exemplars.  Set the
"isGrouped" property true to these, and create a script that looks
like:

  turtle1's x <- 30
  turtle1's y <- 50

and execute it.  When "isGrouped" is true, the original relative
position among the turtles in the breed is retained.  (If isGrouped is
false and execute the above script, everybody goes to (30, 50).)

  Other way would be to have one guy sweep on a picture.  First, drop
a picture on the field.  You can transfer the colors to the default
patch variable.  Create a turtle that moves over this (0, 0) to (99,
99) field and see if the color in the patch variable is certain color.
If it is create a "replica" and leave it the spot.

  Sorry not to provide an example, but I hope this helps a bit.

  Thank you for the feedback!

-- Yoshiki


More information about the Squeakland mailing list