Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: NinjaAerobicsPro
From: "Jeff Knope" <jknope@xxxxxxxx>
Date: Fri, 20 May 2005 15:18:49 -0700

A week ago I posted an EX project, an experiment in 3-D graphics, called
NinjaAerobics.  I apologized for it being in EX, excluding many of you from
viewing it, and promised to port it back to MWPro.  I've now done that, and
the MWPro (Compressed) version is attached.  It includes a new dance sequence
as well.

This one too includes a page2 that illustrates some of the techniques of
perspective and shape management that allow it to work.

In the process of the porting, I discovered another undocumented difference
between Pro and EX that complicated matters:  In EX you may:
  setsize 30
  repeat 15 [setsize size * 1.03 wait 1] (this is a dancer taking 15 steps
  show size
  46.739022498 (this increase in size creates the illusion of the dancer
moving forward.)

  In Pro, the same yields:

  setsize 30
  repeat 15 [setsize size * 1.03 wait 1]
  show size
  30    (a disaster! - no increase in size; no illusion)
In Pro, computations involving size are truncated to an integer; In EX they
are floating-point. A similar difference distinguishes EX from Pro with regard
to towards.

After some floundering, I discovered I could maintain a separate variable,
"size - that keeps track of what it should be, and uses that value for

Speaking of floundering, I had criticized the EX version's procedures as
"classics of never-ending run-on sentences."  After some reflection, I realize
that this program is essentially a scripted sequence (my first such program, I
believe).  In a sense, a script is an ongoing run-on sentence, one little
action following another.  Tempo is controlled with waits scattered
throughout.  So maybe the run-on sentence has its place.

More on waits:  the only way to get several actors acting at once is to launch
their actions, followed immediately by more launches.  Regardless of the
internal waits that allow each character's actions to unfold at a proper pace,
there must also be a "master wait" at the end of the group of launches to
allow time for all the launches to execute before going on to the next
sequence.  Basically, you can add up all the waits in all the launches, add a
handful more, and that's a fair guide to how long the "master wait" should be.

One thing I have no sense of is how different platforms or different speed
processors effect such things.  I have just one machine, and I make things
work fairly nicely on that.  If you experience something that seems
out-of-whack or seriously screwed-up, please advise, along with basic info of
your platform.


Attachment: NinjaAerobicsPro.mwz
Description: Binary data

  • Previous by thread: MIA, Ask an Expert: space game
  • Next by thread: Re: NinjaAerobicsPro

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008