This tutorial exercise provides step-by-step directions for guiding you through building a simple animation. Here you will explore the different methods that can be used for each skill as you follow along. This will provide an overview of the code editor in Alice and teach you the basic skills to get you started creating programs.
You will need to access other printed materials or have access to the alice.org website to view the how to content called out within these materials. These materials can be downloaded and printed for offline use from Alice.org
Don’t forget to save your projects frequently.
Setting up the Scene
First you will need to set up your moon scene similar to what is viewed in the image above. Set up your scene for the animation with props and actors in their appropriate places. Position the alienRobot just out of the top of the camera view so it can make an entrance to the scene. To set up your scene you can either open the supplied starter world or you can create the scene described from scratch. For the following steps, you may wish to watch the Video or check the Quick Reference Guides associated with the How To: Scene Editor Overview and other scene building How to guides.
1. Start Alice.
2. Navigate to the File System tab and browse to the prepared starter world save file or/
3. Select the Moon template from the Blank Slates section of the Select Template Dialog box and build a moon scene similar to that pictured above:
a. Select an Adult object from the gallery. Choosing Adult from the gallery will bring up the Sims builder allowing you to customize many features of a human character including the ability to select the astronaut themed outfit.
b. From the Outer Space section of the Browse Gallery by Theme tab of the Gallery add the MarsOutpostBunker, Boulder, and AlienRobot or build your own simple moon setting but be sure to add the AlienRobot.
4. Move objects around the scene so that the AlienRobot is placed just out of sight above the camera view of the scene.
5. If needed navigate back to the code editor.
Adding Procedural Methods (statements)
Programming the first part of the animation you will have the Alien enter the scene and the astronaut then says “Houston we have a problem”. For the following steps, you may wish to watch the Videos or check the Quick Reference Guides for the How To: Using Procedures Overview.
6. Animate the AlienRobot entering the scene:
a. Select the AlienRobot object from the object menu.
b. Drag the move tile into the myFirstMethod tab of the Editor.
c. From the prompted drop downs select the direction down and the distance .25.
7. Animate the astronaut saying “Houston we have a problem”:
a. Select AdultPerson (or the name of the character you created) from the object menu drop down.
b. Drag the say tile into the myFirstMethod tab of the editor after the first statement.
c. Select the Custom TextString from the pop up drop down.
d. Input “Houston we have a problem” in the input field.
8. Save the project.
Testing, Editing, and Modifying Your Program
As you build your animation you will want to iterate often by running your program to test it and then make edits and modifications to smooth out the animation. For the following steps you may wish to watch the Videos or check the Quick Reference Guides for the How To: Using Procedures Overview.
9. Run your world to test to see if the AlienRobot enters the scene and stops at the desired height:
a. Press the Run button found on the camera view window.
b. Use the restart button to view it as many times as needed to analyze the changes if any that would be needed.
c. Close the runtime window when ready to return to the code editor.
10. Edit and Test the statements till the AlienRobot moves to your desired height in the scene:
a. Adjust your AlienRobot’s move distance by selecting a new value in the drop down or by selecting the custom value input from the drop down and typing in a value.
11. Add optional parameters to your existing statements to change the timing of the animation:
a. On the AlienRobot’s move statement select add detail and add duration from the drop down and select a time value from the list to set how long the move will take.
b. On the AdultPerson say statement select add detail and add duration from the drop down and select a time value from the list to set how long the text will be visible on the scene.
12. Run your world to test that the time the RobotAlien takes to descend into the scene feels good and the time the text appears on the screen is long enough to read:
a. Continue to change if needed and Run to test until you are happy.
13. Save the project.
To make the AlienRobot more energetic for the next step you will animate parts of the alien to give it more character. For the following steps, you may wish to refer to the image above, or use your own ideas. You may wish to watch the Videos or check the Quick Reference Guides for the How To: Manipulating SubJoints (Object Parts).
14. Animate a leg of the AlienRobot:
a. Select the BackLeftKnee using the object select menu first selecting the AlienRobot and then using the side arrow to navigate to the joint.
b. Select the turn tile and drag it to the editor from the procedure list and set it to turn backward 0.25 revolutions.
c. Add another statement that has the same joint turn forward 0.25 to return it to the original position. You can use option click mac or on the created statement to duplicate this statement and edit the direction to quickly create this statement.
15. Animate the other legs of the AlienRobot:
a. Add move procedures to make the BackRightKnee turn backward and forward 0.25. You can build them from scratch or you can copy the existing procedures and edit the object of the statement.
b. Add more procedures for the remaining legs or experiment with other subpart animations for the alien.
16. Run the world to test how it works and make any modifications.
17. Save the project.
Using a Do Together
To make the animation of the legs feel more natural and not happen in a robotic sequence you will mix do in orders and do togethers. For the following steps, you may wish to watch the Videos or check the Quick Reference Guides for the How To: Using a Do Together
18. Have a couple of the legs move at the same time by putting their movement into a do together:
a. Drag a do together block in the myFirstMethod editor.
b. Drag the AlienRobot subjoint movements to be timed together into the do together block.
c. Experiment with nesting do together and do in orders to get a set of movements that you like. Hint – putting two opposite directions inside a do together will cause them to negate each other and nothing will happen.
d. Run and test your program to iterate till you are happy with the animation.
19. Save the project.
Programming a Camera Move
For the following steps, you may wish to use the video associated with this exercise as a reference or come up with your own camera moves. You will use a camera zoom to make the animation more dramatic by zooming in on the astronaut when he/she delivers the punchline. You may wish to watch the Videos or check the Quick Reference Guides for the How To: Setting Up and Using Camera Markers
20. Navigate to the Scene Editor to set up the required camera markers:
a. Add a camera marker at the cameras current position for use as the starting scene camera. Name it appropriately as something like wideScene.
b. Move the camera to a close up view of the astronaut and add another camera maker naming it something appropriate such as astronautClose.
c. Move the camera back to the wideScene camera marker to insure the camera is in the right place for the start of your animation. To do this select wideScene from the camerMarker list and click the button that indicates it will move the camera to the camera marker (left button).
21. Return to the code editor to program the camera move:
a. Select the camera object from the object drop down menu.
b. Select the moveAndOrientTo tile and drag it into myFirstMethod and place it in the program in the right location. Hint – using just the move tile may leave you wondering why the camera is not pointed where you want. This might be because you used the turn or roll controls when moving the camera so need to orient to the new turn and roll not just the new x,y,z.
c. In the drop down select the astronautClose camera marker for the target.
d. Run your program to test the camera move.
e. Use add details to adjust the duration and animation style to achieve the camera move you like. Hint – the default duration is always 1 second so for a clean jump cut you will need to custom set the duration to 0.
Save the project.