Creating an Animation Program Alice. The programming steps.
-
Upload
barrie-gray -
Category
Documents
-
view
229 -
download
0
description
Transcript of Creating an Animation Program Alice. The programming steps.
![Page 1: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/1.jpg)
Creating anAnimation Program
Alice
![Page 2: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/2.jpg)
The programming steps
![Page 3: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/3.jpg)
Step 1: Analyse - Design
Read a problem statement or decide on the problem to be solvedDesign a solution
We will use a storyboard design technique, commonly used in the film industry
![Page 4: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/4.jpg)
Example
The scenario is: Several snowpeople are outdoors, on a snow-
covered landscape. A snowman is trying to meet a snowwoman who is talking with a group of her friends (other snowwomen.) He says “Ahem" and blinks his eyes, trying to get her attention. The problem is:
How can we create this animation?
![Page 5: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/5.jpg)
Create Initial World
![Page 6: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/6.jpg)
StoryboardOption 1: Sketches
![Page 7: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/7.jpg)
StoryboardOption 2: Screen shots
Initial scene Snowman tries to catch snowwoman’s attention
Snowwoman looks around
![Page 8: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/8.jpg)
StoryboardOption 3: Text Form
A textual storyboard is like a "to-do" list.The Learning to Program in Alice textbook puts a textual storyboard in a box:
Do the following actions in order snowman turns to face snowwoman snowman “blinks eyes” and calls out to the snowwoman. snowwoman blushes and turns around. snowman hangs his head in disappointment and turns away
![Page 9: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/9.jpg)
Step 2: Implementation or “Create the Code”
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 10: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/10.jpg)
Action Blocks in Alice
Sequential Action Block – actions occur one after another
Simultaneous Action Block-- actions occur at the same time
![Page 11: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/11.jpg)
Demo
Ch02Snowpeople
![Page 12: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/12.jpg)
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 13: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/13.jpg)
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 14: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/14.jpg)
CommentsWhile 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 15: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/15.jpg)
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 16: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/16.jpg)
Assignment
Read pages 22-25 Chapter 2.1Open Alice and do the steps as illustrated on pages 29-43 Chapter 2-2
Read Tips & Techniques 2 pages 43-53 Orientation and Movement InstructionsThe vehicle property
![Page 17: Creating an Animation Program Alice. The programming steps.](https://reader035.fdocuments.in/reader035/viewer/2022081503/5a4d1b7a7f8b9ab0599b8a44/html5/thumbnails/17.jpg)
Chapter 2 continued
Read the summary p. 57-58Complete Chapter 2 Lab to submit.Review for a test on Chap. 1 and 2