Download presentation
Presentation is loading. Please wait.
Published byMitchell Patterson Modified over 8 years ago
1
Intro CS – Loops, making animations & films Lesson Plan 3
2
Goals Understanding basic looping Repeat Loop Forever If If If-else Wait Until Repeat Until
3
Objectives Students are introduced to the topic and given examples of looping Students are given real problems to code and solve using loops Results are demonstrated through demos of running code and displayed results
4
Pre Requisites Basic Understanding of Scratch and Sprites Students should have already created a Scratch program in LP 2 – Walking Cat that introduces them to repeat loops.
5
Materials Slides with examples (or present on whiteboard) PCs with development environments installed – Scratch
6
Lesson Description Introduces the concept of the Repeat loop, providing simple examples of doing animation Students practice and extend examples to their own wishes, and create new animations Students present their solutions, typically F2F with the instructor(s) at their desk Students analyze their and others’ solutions for bugs
7
Lesson Procedure Intro/Trigger – Discuss looping in real life Show how loops can be used to do animation and test for end states (Angry Birds) Computers are great for doing things over and over for us, but they have to know when to stop (and we have to tell them when) Show how loops can solve basic iteration/math problems Doing something N times Show basic examples of Repeat loop and discuss
8
Lesson Procedure (cont.) Activity Create a 1 minute animation that tells a story Walk the room answering questions, looking over the shoulder, asking questions, etc.
9
Closure/Conclusion Discussion What are Repeat loops good for? What’s difficult in using them? How else can you use them? Summary Repeat loops: to repeat something N times Ask questions on what is confusing or needs more time/practice
10
Agenda Review what we learned about in the last lesson Introduction to Scratch and created walking cat animation This lesson we will concentrate on: Sprites Attributes Methods Sequences Looping Controls Looks Making an animation film
11
Loops – Making of animations and films Lesson Plan 3
12
Review of Last Lecture What were some cool things we learned about in the last lecture? What were some problems you had? Any advice/tips for other students
13
Example Demo Let’s look at an example of using sprites to make a quick film Short Animation Short Animation Give you guys 5 minutes to write a quick script of an animation you want to create today in class Think about 2 sprites interacting with each other How long should you wait between interactions? Think about a story line
14
Sprites Sprites are “actors” within your program/game, and you’re the director They only do exactly what you tell them When your program starts, you tell them where to go, how/when to move, and what to look like Sprites have attributes and methods, what do you think this means?
15
Sprite Attributes Sprite has “attributes” also known as description or property that tell something about it, such as: center position (x-Position and y-Position) that can be adjusted when editing the sprite direction it will move in size in percent actual costume rotation type Center Position: (x-position, y-position)
16
Sprite Methods Methods are commands we can use to tell the sprite what to do, and are created by using the colorful blocks in Scratch. Move 10 “steps” (in the direction previously set) Turn 20 degrees Point to a direction (or another sprite) “Glide” for 3 seconds to a location Say something in a cartoon balloon Hello!
17
Sequence and Looping Sequence is the arrangement of several blocks after another. Looping is used when you want to execute a sequence several times. What is this example doing? More examples of loops:
18
Control When clicked – you’re already familiar with this one Used to get things set up where you want them, and to do anything else you want Wait 23 seconds (or any other amount of time) Repeat 3 times block (or any other number) Again using loops to repeat an animation several times without copying or any additional work
19
Looks Have your sprites say or think things in cartoon balloons Change different effects for your sprite(s) Color, fisheye, whirl, pixelate, mosaic, brightness, ghost Feel free to experiment with these Show/Hide Go to front: important to keep sprites from overlapping badly Go back 2 layers (or however many layers): can also be used for overlap
20
Daily project By the end of class Create your own Storyboard/Script using existing sprites. This should be in text format, such as: Scene: Forest with frog an princess Frog: Hey princess, what’s up? Princess: I’m on a mission to save the kingdom Etc. Once you have a script, make an animation of it in Scratch Must have a background, at least 2 actors, animation of the actors, and dialog
21
Example Demo Take a quick look at how I did mine to give you guys some ideas Short Animation Short Animation
22
Daily Project Continued Worth 10 points total. Remember to save your project and turn it into the homedirs “IntroToCS” folder! File format: LP3-YourLastName_YourFirstName.sb If you’re stuck remember you have the help tutorial and example files Grade Breakdown – Must IncludePoints 1) At least 2 spritesEach sprite is worth 1 point 2) Movement across the screen of at least 1 of the sprites, must use looping 2 points 3) Script on paper or in Word1 point 4) Clicking the green flag will start the animation1 point 5) Clicking on the space bar will result in some action1 point 6) At least 1 sprite must say/think something1 point 7) Change the background1 point 8) Change the color of a sprite on key click (your choice of key)1 point
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.