creating an animation program alice. recall we began the animation creation process we introduced...

13
Creating An Animation Program Alice

Upload: mavis-summers

Post on 18-Jan-2018

216 views

Category:

Documents


0 download

DESCRIPTION

Step 2: Implementation To implement the storyboard, translate the actions in the storyboard to a program. Program (a.k.a. script) a list of instructions to have the objects perform certain actions in the animation

TRANSCRIPT

Page 1: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Creating An AnimationProgram

Alice

Page 2: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Recall

We began the animation creation processWe introduced the concept of storyboard

We will continue using the example presented in the previous session

Page 3: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Step 2: Implementation

To implement the storyboard, translate the actions in the storyboard to a program.Program (a.k.a. script)

a list of instructions to have the objects perform certain actions in the animation

Page 4: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Writing the Program

Our planned storyboard (to-do list) is:

The idea now is to translate the design steps to program instructions.

Do the following actions in order snowman turns to face snowwoman snowman “blinks eyes” and calls out to the snowwoman. snowwoman turns around.

Page 5: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Translating the Design

Some steps in the storyboard can be written as a single instruction

The snowman turns to face the snowwoman

Other steps are composite actions that require more than one instruction

The snowman tries to catch the snowwoman’s attention is two actions

The snowman says “ahem”The snowman raises and lowers his eyes

Page 6: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Action Blocks in Alice

Sequential Action Block

Simultaneous Action Block

Page 7: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Demo

Ch02Snowpeople

Page 8: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Concepts in this first program

Program instructions may have arguments Example: for the move instruction, the arguments we used in this example were

direction distance

DoTogether and DoInOrder blocks can be nested one inside the other

Page 9: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Testing

An important step in creating a program is to run it – to be sure it does what you expect it to do.We recommend that you use an incremental development process:

write a few lines of code and then run it write a few more lines and run it write a few more lines and run it…

This process allows you to find any problems and fix them as you go along.

Page 10: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Comments

While Alice instructions are easy to understand, a particular combination of the instructions may perform an action that is not immediately obvious. Comments are used to document the code – explain the purpose of a particular segment of the program to the human reader.

Page 11: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Demo

Ch02SnowpeoplewithCommentsComments in this example world illustrate

description of the action performed by the entire method description of the purpose of a small segment of code

Page 12: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Assignment

Read Chapter 2, Section 2 A First Program

Read Tips & Techniques 2, Orientation and Movement Instructions

Page 13: Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the

Lab

Chapter 2 Lab Lec2