MicroWorlds EX™ Lessons
Lesson Four: Animation in MW EX
Animation is a way to use static shapes (still pictures or poses) in a rapid sequence to make them appear to be dynamic (actually moving in a smooth way). To create this illusion, you will need to master a couple of important components, then blend them together.
A) What Shapes Can I Start With?
On the right side of your screen, there are four tabs. One of these is called Graphics. Click on this and look in the lower section of this particular tab to see a large number of shapes for the turtle that the program comes with. Then, find the number that goes with the shape(s) you are interested in. Type the Setshape (setsh) command followed by the number that you want. For my example, I chose #'s 19 and 20 for the running dog.
For starters, I would have: repeat 20 [setsh 19 setsh 20]
B) Slowing This Down So The Human Eye Can See It Happen
If you tried the command above, it probably happened so fast, you couldn't tell anything had really happened. So, after each new pose or shape, type in some form of the wait command. Wait 1 will pause for 1/10 of a second. Wait 10 will pause for 1 whole second. Try out different numbers and see what looks most realistic to your eye.
Now we would have: repeat 20 [setsh 19 wait 1 setsh 20 wait 1]
NOTE: you must have a wait command after EACH
pose, or you will not see that particular pose because it will happen too quickly.
C) Aiming Shapes and Moving Them
Some people just keep using rt or lt to turn the turtles, but it is usually safest to use the setheading command to guarantee that your shape is aiming in the exact direction you want. Go back to Lesson Three and review the setheading command if you need to. For now, I want to aim my dogs to the left, so I will choose seth 270. This will only need to be done once at the beginning, so I do not need to do this inside the repeat brackets.
To move the shapes, just put a little fd 1, fd 3or fd 10 after EACH pose of the dog. Again, fine tune it with whatever number you think makes the running motion seem most realistic.
So, now we have: seth 270 repeat 20 [setsh 19 wait 1 fd 3 setsh 20 wait 1 fd 3]
D) How Can I Modify These Shapes?
Soon, you will want to change the shapes a little. For example, you might want the dog to run the other way later in your story.
Before you change any of the original shapes, it is a good idea to save a copy of the shape and then only modify the copy. To do this, single-click on the shape you want to copy, then choose copy from the buttons on the right side of the toolbar at the top of the page. Then scroll down to an empy shape (one with just a dot in the middle) and click on it once, and then choose paste.
To modify this new shape, double-click on it. For the easiest changes, just use the toolbar buttons along the top to flip it upside down, or aiming right instead of left. For more complex changes, you can change each little pixel (tiny squares that make up the bigger picture of the animal or design). When you are finished, click OK on the top right. If you don't like your changes, just click Cancel.
Assuming you made two new copies of the dog shape, and you flipped them so
that they aimed to the right side of the screen, AND you saved them to shapes
38 & 39. Your new command might look like this:
seth 90 repeat 20 [setsh
38 wait 1 fd 3 setsh 39 wait 1 fd 3]
Notice that everything is the same EXCEPT the setheading direction and the numbers
for the two new shapes.
Lesson Five: Buttons and Sliders (Coming Soon)
| HTS Home | | | Calendar | | | Classes | | | Departments | | | Resources | | | What's New? | Newsletter |