[MWForum]Duplicating turtles for game levels
Harvey Bornfield
mwforum@lists.mathcats.com
Mon, 04 Aug 2003 23:16:57 -0700
--=====================_1981559==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Dear Lisa,
the PAGELIST reporter always identifies the page you're on, by stashing it
in the first position on the list
Capitalizing on this, you can create a homespun reporter to extract that
information wherever you are:
to thispage
op first pagelist
end
Analyzing the value of THISPAGE, you can now merrily, 'IF_THEN' your way to
one of any of several routines.
Here's an even more interesting variation:
If you renamed your pages Level_01, Level_02, Level_03, etc, then you could
rename the THISPAGE reporter, GAMELEVEL and modify it slightly
to return just a level number. Numeric values would prove valuable if one
or more level ranges share common strategies.
to GAMELEVEL
op bf bf bf bf bf bf first pagelist ;(works only when stripping away the
first six characters of the page)
end
At 11:50 PM 8/4/2003, you wrote:
>I've several kids in my classes that want to design "levels" to their
>games. Basically, this means that when their player has accomplished the
>goal on one page, they take him to a new one where the action continues
>with a similar challenge...just a bit more difficult/complex.
>
>My question has to do with the turtles...and particularly their names and
>the procedures which affect them. MicroWorlds allows you to create
>multiple pages which contain the same turtle (names). This is what we'd
>like, of course, because the core of the game logic will be used across
>pages (our "levels"). However, we've run into difficulty. Understandably
>so, I suppose. For example, how is MicroWorlds to know which of the CAR
>turtles it should work on when there's one on page1 and page2? My
>assumption would be that it would affect the one on the active page
>only. But this doesn't appear to be correct. MW appears to be ignoring
>the turtles on the second page.
>
>Is there something we're missing? Is it even possible to have two turtles
>(with the same name) on separate pages utilizing the same code? If not,
>could you share any tricks to get this concept working without duplicating
>code? (On option would be to use variable input to the procedures and
>pass in the turtle name, but even this would require reworking what
>they've already designed and tested.)
>
>Thanks a million for any suggestions.
>
>Lisa Richter
>Cosmic Thinkers in Laguna Beach, CA
>Lisa@CosmicThinkers.com
>_______________________________________________
>MWForum mailing list
>MWForum@lists.mathcats.com
>http://lists.mathcats.com/mailman/listinfo/mwforum
>attachments archived at:
>http://www.mathcats.com/mwforum/attachments.html
"Music is the one incorporeal entrance into the higher world of knowledge
which comprehends mankind, but mankind cannot comprehend."
Ludwig van Beethoven
--=====================_1981559==.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<body>
Dear Lisa,<br>
the PAGELIST reporter always identifies the page you're on, by stashing
it in the first position on the list<br>
Capitalizing on this, you can create a homespun reporter to extract that
information wherever you are:<br><br>
to thispage<br>
op first pagelist<br>
end<br><br>
Analyzing the value of THISPAGE, you can now merrily, 'IF_THEN' your way
to one of any of several routines.<br><br>
Here's an even more interesting variation:<br><br>
If you renamed your pages Level_01, Level_02, Level_03, etc, then you
could rename the THISPAGE reporter, GAMELEVEL and modify it
slightly<br>
to return just a level number. Numeric values would prove valuable if one
or more level ranges share common strategies.<br><br>
to GAMELEVEL<br>
op bf bf bf bf bf bf first pagelist ;(works only when stripping
away the first six characters of the page)<br>
end <br><br>
<br><br>
At 11:50 PM 8/4/2003, you wrote:<br>
<blockquote type=cite class=cite cite>I've several kids in my classes
that want to design "levels" to their games. Basically,
this means that when their player has accomplished the goal on one page,
they take him to a new one where the action continues with a similar
challenge...just a bit more difficult/complex. <br><br>
My question has to do with the turtles...and particularly their names and
the procedures which affect them. MicroWorlds allows you to create
multiple pages which contain the same turtle (names). This is what
we'd like, of course, because the core of the game logic will be used
across pages (our "levels"). However, we've run into
difficulty. Understandably so, I suppose. For example, how is
MicroWorlds to know which of the CAR turtles it should work on when
there's one on page1 and page2? My assumption would be that it
would affect the one on the active page only. But this doesn't
appear to be correct. MW appears to be ignoring the turtles on the second
page.<br><br>
Is there something we're missing? Is it even possible to have two
turtles (with the same name) on separate pages utilizing the same
code? If not, could you share any tricks to get this concept
working without duplicating code? (On option would be to use
variable input to the procedures and pass in the turtle name, but even
this would require reworking what they've already designed and tested.)
<br><br>
Thanks a million for any suggestions. <br><br>
Lisa Richter<br>
Cosmic Thinkers in Laguna Beach, CA<br>
Lisa@CosmicThinkers.com<br>
_______________________________________________<br>
MWForum mailing list<br>
MWForum@lists.mathcats.com<br>
<a href="http://lists.mathcats.com/mailman/listinfo/mwforum" eudora="autourl">http://lists.mathcats.com/mailman/listinfo/mwforum</a><br>
attachments archived at:<br>
<a href="http://www.mathcats.com/mwforum/attachments.html" eudora="autourl">http://www.mathcats.com/mwforum/attachments.html</a>
</blockquote>
<x-sigsep><p></x-sigsep>
<font face="Bell MT">"Music is the one incorporeal entrance into the higher world of knowledge which comprehends mankind, but mankind cannot comprehend." <br>
Ludwig van Beethoven <br><br>
<br>
</font></body>
</html>
--=====================_1981559==.ALT--