Program Design with Alice III

Overview

In today's project we are going to be continue using the Alice software. Since you are back on the machines and if you have not already done so you will need to reinstall Alice.
  1. Right click on the link provided here and select save link as, you can save it to the Desktop 

  2. Go to the desktop and find the folder labeled Alice.zip (on Windows it may look like there is a zipper running through the folder icon).  Right click on the folder and select Extract All

  3. Follow the directions and extract all the files to a folder called Alice on the desktop

  4. Go into the folder labeled Alice and double click on the icon named Alice to start the program.

  5. Say yes if it asks if you want to run the program

The project

Having been through the tutorials you have become acquainted with the workings of the Alice 3D animations. You have explored writing simple methods/actions to increase the capabilities of the objects in your animations. You have seen how to add "Events" to your world that allow user interactions with the objects on the screen. In this project, we are going to take one of the existing prepackaged projects that we have not yet seen and modify it so it has a happy ending. Unlike the tutorials, I will not guide your every action, nor will I be able to verify that that actions you completed were correct. This will be your job in solving these problems. I however will attempt to give you detailed instructions on what needs to be done and when I expect it will be unclear, I will suggest what manipulations you should be doing with Alice.

The story line

Open up the snowLove project that is available when you chose File/Open World and then find and select "snowLove" underneath the Examples tab. Play the animation. Watch the sad story of a snow man who see the snow woman of his dreams melt away before his very eyes.   We of course believe in happy endings so we want to fix the end of the story by both reviving the now melted snow woman and allowing them each to proclaim their love for one another.  In order to do this you will need to create a new method to restore the snow woman, and then add some new steps to the basic movie algorithm allowing her to be revived and having them proclaim their love for one another.

Important note: At any time you can save the world you are working on so you can go back to it later. To do this select File/Save As and then browse to your flash drive as you normally would when you want to save something. You can open it up later with File/Open World.

Getting Started

To get started you need to survey what you already have. In front of you on the screen should be the current World.movie. This is what occurs whenever you play the animation. Look at each step and get a sense of what is happening. Many of the steps actually hand the work off to other methods that are part of the world such as World.heyBaby and World.melt.  You can look at these methods to see how they work by clicking on the World in the upper left hand corner, and then clicking edit next to any of its methods listed on the lower left which you want to see.  Click the edit button next to the melt method and see how they accomplished the melting process. Later on you will be reversing this process so it will be useful to see how it was done the first time.

Task 1

Now that you have a sense for what is going on, you are going to create another melt method. This is mostly for practice but we will be using it again at the end of the project.
  1. Click on the World (if you have not already done so) 

  2. Click on the melt method, which is used to melt the snowwoman. Note a few things. First, a variable is defined at the top, called meltDuration. This variable is set to 2 seconds. This variable is then used in several spots. By using a variable, you can change the meltDuration by making a change in one place, rather than in multiple places. Also note that DoTogether is used. We have not used this before. This allows multiple actions to be done in parallel. You can insert a Do together by dragging it from the bottom. You can also drag Do in order to make things occur sequentially. In this case, multiple actions are done in parallel and two actions are done sequentially, but in parallel with the rest. Now that you understand the melt method, you can proceed.

  3. On the bottom left select Create Method so that you can build another melt method. However call this one meltMan

  4. Add steps to your meltMan method so it does all the same thing to the Snowman that were done to the Snowwoman in the melt method. You can click back and forth between them to see what you need to add.  Note: to get the Snowman methods to draw over you will need to click on the Snowman in the top left corner and then select the methods you need from the lower left.  Also the ability to change the opacity will be found under the properties of the specific body part you want to change. That is, before the woman melts she becomes 50% transparent and then shrinks in height. Redoing all of the steps is a bit monotonous, so just to the key steps, so that the snowman will melt in a somewhat realistic manner. For example, you need not make his hat spin.

  5. When you have completed the method go back into the World.movie tab.

  6. Add the meltMan method to the story right before the fadeOut step of the movie.

Make sure you run the animation at least once to make sure that it works correctly. If the snowman does not melt after the snowwoman then you have done something wrong and need to check through all the steps again to find your error.

Task 2

Congrats on getting through the first method. However, we really don't want the snowman to melt so go ahead and remove that line from the World.movie story line. You should be able to right click next to that line in World.movie and select delete.

Now you want to make it so the snowwoman can be revived.
  1. In the world method create a new method

  2. Call the method unmelt

  3. Add steps to reverse the melting proceed of the SnowWoman -- you should your method frequently with the melt method to make sure you are doing all the steps that affect the snowwoman in reverse order.  

  4. When the method is complete go to the World.movie story and add the unmelt action right before the fadeOut line.

  5. Run the animation. 

  6. It is likely that the resizing didn't work quite right.  You will need to try some trial and error to get the values of the resizing where you want them to be. The same may be true of the placement of the hat. Just play around with these values until you are happy with the outcome. Note that you cannot just reverse the steps, since that would mean that the hat would rise after the snowwoman unmelts.

Task 3

The hard part is over the snowwoman is restored. Now we would like to make the event a little more interesting.
  1. Edit the unmelt method to contain each of the following embellishments

  2. Just after the unmelting begins, have the snowman raise his eyebrows.

  3. A little farther along in the unmelting have the snowman spin around in a circle.

  4. As the method ends, have the snowman jump up and down.

  5. Be sure to test your method each time you make a major change to ensure it is doing what you expect.

Task 4

The final touch is to make the two snowpeople exchange pleasantries.
  1. In the World.movie story you should have the two snowpeople each exchange words with their respective "say" methods. You can have them say whatever you believe is a fitting end to your story.
Test you story repeatedly to make sure everything works as it should.

Finishing up

Save your world to your USB Flash drive, and then email me the final product as an attachment to gweiss@cis.fordham.edu. You need not mail me the answers to the tutorial parts-- I have decided to let you skip that.

Extra credit: You can receive a little bit of extra credit by adding substantial more action to this story, to make it more interesting. You can receive even more extra credit by creating a new story from scratch (using what you learned in tutorial 4) by starting from a fresh world and then animating it. Note that this last task might require a lot of effort (and you may find it fun), but the amount of extra credit will be limited, so only do it if you enjoy it or if your grade can really use some help. In this case, you can email me two stories.