programming module ta 300 morell regional high school · morell regional high school in your ta300...

13
1 Programming Module TA 300 Morell Regional High School In your TA300 folder create another sub-folder called PROGRAMMING You will need to keep a journal throughout this module. A place to record your thoughts and observations and answer questions. You can use either Word or Word Perfect. Save the file as JOURNAL. Add and re-save as required through-out this Module

Upload: others

Post on 16-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

1

Programming Module

TA 300

Morell Regional High School

In your TA300 folder create another sub-folder called PROGRAMMING

You will need to keep a journal throughout this module. A place to record your thoughts

and observations and answer questions. You can use either Word or Word Perfect. Save

the file as JOURNAL. Add and re-save as required through-out this Module

Page 2: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

2

Introduction to Programming

The words “computer programming’ often bring negative thoughts to student’s minds. It’s hard!

It’s boring! It’s for nerds! The idea of programming a computer can seem overwhelming.

In fact, a program is a detailed list of instructions telling the computer what to do. It’s kind of

like a recipe in that there are steps to follow in a certain order to get the result you want.

Programming helps people become better thinkers and planners. Creating a computer program

requires you to think carefully about what you want to happen. There is planning and problem

solving involved but also lots of room for imagination, creativity and humour.

The steps of creating a program are a lot like making a movie.

1) You start with an idea or story that you want to tell. In programming, this is called the

scenario. The scenario describes the series of scenes that take place in the animation.

2) Next comes some planning and writing. The moviemaker plans their film as a series of smaller

pieces called scenes in which characters do and/or say things. The programmer does the same

thing, creating storyboards for what they want to happen.

3) Once the storyboards are complete, the programmer goes ahead and writes the detailed

instructions to make things happen. Sometimes the instructions or code are written in a special

computer language. Don’t worry, all of your programming will be done using regular English or

by using pictures.

4) The programmer tests their program by running it and watching the results. If there are

problems or bugs in the program, the programmer uses their problem solving skills to figure out

what changes are needed.

In this module you will get a good look at programming. You will get to use software that allows

you to program for 3-D characters and objects that would be at home in a video game.

Page 3: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

3

Introduction to Alice

Alice is a free 3-D animation software created at Carnegie-Mellon University to help students of

all ages learn about programming. It has the look and feel of a video game environment.

In Alice, you get to play the role of writer and director in a virtual world where objects perform

the actions you tell them to. The good news is most of the hard work has been done for you.

There are a number of virtual world templates for you to use as settings for your stories along

with many objects, including characters, to place in these worlds. These objects all come with the

ability to do various actions.

Your task is to have them do the right action, in the right order, at the right time to tell the story

you want.

Once you have come up with an idea, planned how it is going to look on screen and programmed

the objects to do the actions, you can run each scene to see the results. From there you can

problem solve the bugs and make needed changes.

The activities in the pages ahead will introduce you to the basics of Alice. Using the skills you

learn, some planning and imagination, the sky’s the limit on what you can create!

You will need to keep a journal throughout this module. A place to record your thoughts

and observations and answer questions. You can use either Word or Word Perfect. Save

the file as JOURNAL. Add and re-save as required through-out this Module

Page 4: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

4

Activity 1

1. Open the Alice software program.* Be sure to set your monitor resolution at1024x768** It is possible that this program will be foundon your Desktop and not in your Usernet StudentGroup.

2. Click on the Examples tab.If the box to the right is not visible on yourscreen, click Help and then ExampleWorlds

3. Open the lakeSkater example.

4. Before running the example, take a few moments and look over the Alice screen.There are 5 areas. Moving clockwise from the top right are: Events Area, Editing Area, Details Area and Object Tree. These four all haveinformation in them about the lakeSkater example.The World Window is the area in the middle at the top. This is where all the visualplanning and animation takes place.

Page 5: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

5

5. Press to run the lakeSkater example.

6. Play the example several times and practice how to Pause and Resume the action. Increase and decrease the speed of the animation.

7. Scroll down through the text in the Editing area. These are the directions given to theObjects in the scene. In Alice, each one of these directions is called a Method.

8. Click on Help and then the following Example Worlds: LightDemo and FlightSimulator. Open these examples to get an idea of what kinds of things you can do usingAlice. Before playing each one, take some time to check out the five screen areas and theinformation showing in each one.

9. Open your journal. Record one thing that you like and one thing that you dislike abouteach example world. Also list 3 ideas for animations you might like to create.

Page 6: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

6

Activity 2

1. Open the Alice software program.

2. Click on Help and then Tutorial

3. Open and go through Tutorial 4. Eventhough it is the last of the tutorials, it is agood place to start. Trust us on this.

* Be prepared to demonstrate to your teacherthat you know how to use the Tutorial

Part B

4. Now that you know how to add and manipulate objects in an Alice world, let’s get somepractice and have some fun.

5. Click on File and then New World.

6. Open the World template of your choice. Save this world now and regularly as youmake changes to it. Check with yourteacher on where they would like you tosave your work.

Page 7: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

7

7. Use the button to place six objects from the Local Gallery into your scene.

Three of these objects should be people or animals while the other three shouldbe buildings or things.

8. Practice using your mouse to fine tune the object’s Position and Orientation in the scene. An object’s position is where it is placed in the scene while it’s orientation is whatdirection it is facing.

9. Use the Camera Controls tochange the point of view inyour scene.

10. Use the Mouse Controls tomove, manipulate, re-size andcopy each object.

11. Right click on an object and choose delete from the menu. Watch it whirl away. Use theAdd Objects button to replace it.

12. Place a check mark in the affect subparts box. Click on a person or animal.13. A bounding box will appear on a part of their body. Use the mouse controls to change

their Pose. The pose is the position of parts of an object.

14. Save your World for the last time. * Be sure to select your G: Drive as the location for saving your files.

15. Open your journal. List each object in your scene and the final change you made to it.

Page 8: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

8

Activity 3

To use our example from the Introduction, you can now do a number of things towards making amovie. You can set the stage for scenes (by opening virtual world templates). You can addcharacters and items (objects) to these scenes (from the local gallery). You can change the pointof view, position, orient and pose these objects within the scene (using the camera and mousecontrols). It’s time for the director to yell, “Action!” Let’s set the actors (objects) in motion and add someanimation to the scene.

1. Open the Alice software program.

2. Open and go through Tutorial 1. Take your time and do not be afraid to use the backbutton to review steps. Don’t move on until you feel you understand how to animateobjects using their Methods.

3. Click on File and then New World.

4. Open the Grass World template. Save this world now and regularly as you make changesto it.

5. Using the Add Objects button, from the Local Gallery - Animals folder, add Chicken toyour scene.

6. Position the chicken in the middle of your scene and re-size her so she is about twice heroriginal size.

7. All of the objects in your scene are listed in the Object Tree. Click on the chicken to select her and then click on the plus signbeside the word chicken to see all the parts of her that can performactions using methods.

Page 9: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

9

Notice that as you select a part of the chicken’s body in theobject tree list, the methods in the Details area below it change.

8. Let’s get this chicken in motion using her available methods. Select the word chicken again in the object tree. From themethods listed in the Details area, click and drag the first one, “chicken move”, into the Editing area.

9. When you do this a menu with a list ofoptions will appear. Click on left - 1 meter.

10. Press Play to watch the chicken move a shortdistance to the left.

11. Close the World Window. Repeat the last three steps but this time have the chicken move1 meter to the right. Your Editing area should look like the one below.

12. Check your work by playing the animation. The chicken should end up in her originalposition in the middle of the scene.

Page 10: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

10

13. Let’s have some more fun with chicken. Using the available methods in the Details area,have her do the following actions:

• Move up a short distance.• Move down the same distance.• Turn one way and then the other.• Roll one way and then the other.• Grow larger and then shrink back to her original size.• Think, “I wish I could score a goal”.

14. Change the order of the actions by dragging a method to another place in the method list.

15. You can correct some mistakes by using the Undo and Redo buttons at the top of thescreen. You can delete a method by dragging and dropping it in the Trash can.

16. Now for the grand finale!Let’s make the chicken’s wish come true (sort of).From the Local Gallery - Sports folder, add a hockey goal to the scene.Position it to the left of the chicken and orient it to face her.Make the goal larger than the chicken. Have the chicken move into the goal and end the animation with an appropriate sound ofcelebration. Good chicken luck!

17. Save your World for the last time.

Page 11: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

11

Activity 4

In Activity 3, you created an animation in which all of the actions took place one after the other.In the world of programming, this is called sequential processing.You can also have more than one action happen at the same time, this is called simultaneousprocessing. In Alice, this is done using the Do Together control statement.An action can be repeated a number of times. This is called looping and in Alice is done using aLoop control statement.

Both of these control statements are found at the bottom of the Editing area.

These control statements can be used by dragging and dropping them into the Editing area. Fromthere, you can place an object’s methods inside the control statement.

In this example, the chicken will perform the first two methods one after the other and then do thelast two together. She will move up and then down followed by a turn to the right while saying“Cluck! Cluck!”

In this example, we added a speaking methodfor the chicken. This is followed by Up andDown methods placed inside a Loop controlstatement. The Loop control statement is set torepeat the Up and Down methods five times. After saying, “Yippie!”, it will appear that thechicken is jumping up and down.

Page 12: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

12

Now it’s your turn to try out the Do together and Loop control statements.

1. Open the Alice software program.

2. Click on File and then New World.

3. Open the Sand World template. Save this world now and regularly as you make changesto it.

4. Using the Add Objects button, from the Local Gallery - Animals folder add Hare to yourscene.

5. Position him in the middle of the scene. Re-size him as you wish.

6. Using the Do together and Loop control statements, have Hare jump up and down 6 timeswhile saying “Yippie!”.

7. For an extra challenge, add another object to the scene and have it perform an actionwhile the Hare is doing his.

8. Save your World for the last time.

Page 13: Programming Module TA 300 Morell Regional High School · Morell Regional High School In your TA300 folder create another sub-folder called PROGR AM MING ... Play the example several

13

Activity 5

Congratulations!

You now have a number of programming skills in the Alice software. It’s time to put them and

your imagination to use by telling your own story.

Here is your final assignment for this section of the Programming module.

Remember to save your work regularly as you make changes to it.

Scenario: Begin by writing a short paragraph outlining the story you want to tell using

animation. It can be an original work or perhaps you would like to re-enact a scene from a

favourite movie or book. The scenario will tell the setting, where the story takes place, the

objects that will appear in each scene and what the objects do and say in each scene.

Storyboards: On separate sheets of paper, do a rough sketch of what each scene will look like.

Number each storyboard in the sequence the scene appears in the animation. Include a brief

written description of the scene on each storyboard.

Create an animation using your knowledge of Alice programming skills.

Your final product must include at least the following:

• Three scenes- start, middle and end of a story is preferred (Introduction, Rising Action,

Climax, Conclusion)

• Two living objects

• Three other objects

• Dialog between characters.

• Evidence of manipulation of objects.

• Two sounds

• Use of the Do Together and Loop control statements.

• At least 2 different Camera Views

For inspiration, new skills and possible better marks, you might want to go through Tutorials 2

and 3.

UPDATE and Save you JOURNAL File