In this lab, we will get familiar with the Alice programming environment. The lab will be presented by the TA step-by-step. However, you are free to work at your own pace on the lab.
All programming in the labs will be done in pairs. Each member of the pair receives the same grade for a lab assignment. Pairs are responsible for determining how to interact and work with each other. You may use one or two computers. A key deliverable of this lab is to submit the name of your partner. If you are unable to find a partner on your own, the TA and instructor will work to find a partner for you.
You will see a login screen when you first sit down at the computer. (If you do not, check to see if the computer is on. Press the power on button and wait for the system to start.) To login, you will need your Novell account user id and password. These are initially your student id and your date of birth (MMDDYY). Your TA does not know your user id/password. Type in your user id and password and click to login.
TASK: Login to the system using your Novell user id and password.
Alice can be found in the Start menu under the Programs item.
TASK: Open up Alice.
Alice comes with several tutorials. When you first open up Alice, you will be presented with a screen to determine what world to use. Select the Tutorial tab and open up the tutorial with the bunny called "Defending Naptime".
TASK: Open up the bunny "Defending Naptime" tutorial. Read through and follow the tutorial.
The Alice environment allows you to build stories by writing programs. An Alice world consists of objects (top-left corner), the world view, events (top-right corner), and methods that are edited using a method editor (bottom). We will learn how all these features work in time. For this lab, we will just explore some of them.
You can move the camera in the Alice world using the camera buttons. Try moving the camera.
There are several sample worlds to use. We will use the SpinningCubes world.
TASK: Open up the SpinningCubes world and play it.
Our lab task is to modify the cubes world. First, we will save a copy of this world for us in your home directory on F: by selecting Save World As... from the File menu.
The first goal is to move the camera using the camera controls so that we are looking down from the top at the two cubes. Make it look something like below (do not worry about it being exact).
Next, we will make the first cube rotate only once and the second cube rotate 4 times. This requires you click on the revolution and select 1 for the first box. For the second box, select Other from the menu and type in 4.
We can change how long it takes the cube to spin. For the first cube, click on the More... of the turn method. From the menu, select duration with a time of 0.25 seconds.
The cube is an object which has methods that allow it do things. To see the methods of an object, click on the name of the object in the object tree (select the cube object). Under the methods tab, you see a list of methods that the object can do. Let's make the blue cube go up 5 meters after it spins. Click and drag the move method and put it in between the second and third commands. What we have done is called a method to make the cube move. Play the world to see the changes.
Every object has properties that represents its size, color and other attributes. We can change the red cube to yellow by clicking on cube2 in the object tree, selecting the properties tab, and then selecting yellow for the color property.
We can add more objects to the world by clicking on the add objects button. Objects are stored in galleries. There are many different galleries of objects, creatures, and people. Before we add new objects, let's copy the cube object and create another cube. Click on the copy objects button and then click on the yellow cube to copy it. After you copy it, change its color to green. Optionally, you can try make the new cube move or spin.
One special object is the 3D text object (it is in the last gallery). Add a 3D text object with your name and student id. Add another 3D text object with the name and student id of your partner. You may have to experiment with the buttons to move and resize the object to make it look good. Once it again, it does not have to be exact.
Two "fun" methods are say and play sound. First, make sure to click on the Done button to close Add Object view. Click on cube in the object tree and make sure the methods tab is selected. Drag the say method to the bottom of the command list, select Other... from the menu, and make the cube say "Hello World!".
Next, drag the play sound method to the end of the command list. Have it play a doorbell sound. Play your world.
Finally, add some other objects to your world. Whatever you wish...
For this lab assignment, each person should submit using Connect the modified version of the SpinningCubes world just created.