Review: Interactive Animation
Expected Time: 45 - 60 mins.
Students will be able to apply these concepts:
- Adding Actors
- Adding Costumes
- Animating and moving Actors
- Key press or tilt events
- Loops for repetition
- Sound events
- Create an underwater adventure game involving moving and animating fish, and avoiding enemies.
- Review from Programming 101
New Tynker Code Blocks or Tools
- Review from Programming 101
Materials, Resources, and Prep
- One computer for each student to log on to tynker.com or one iPad for each student with the Tynker app installed.
- (Optional) Prepare teacher computer screen to display to whole class, which can be used in the Wrap-Up.
Students can work through this whole lesson successfully on their own computers or iPads.
1. "Concepts" (story / concepts)
- Petey the Pirate introduces himself and reviews some basic concepts:
- Change X / Y - We move Actors by changing their x- or y-values.
- Costumes and Animation - Costumes are different pictures of an Actor. We animate Actors by changing their Costumes.
- Code Blocks and Loops - Adding a code block to an Actor programs that Actor what to do. "Repeat" and "Forever" blocks make looping happen for the code blocks inside them.
2-3. "Swimming Fish 1" (DIY project)
- Sample projects at the start show students how their program will run when they have done their coding - in this case, a shark and yellow fish swimming. If you are on mobile, tilt the tablet to move the fish. If you are on web, use the arrow keys to move the fish.
- This should be a straightforward review for students of the basic code blocks for movement and animation they previously learned in Programming 101: "Add Costume", "Move", "Next Costume", "Wait", "Forever", "If Edge Bounce".
- They also get to see the difference between an Actor that moves and animates across the Stage, compared with an Actor that only animates in place.
4. "Swimming Fish 2" (DIY project)
- Students add on to the code they wrote in the previous module, allowing the user to move the yellow fish in all 4 directions with the arrow keys or by tilting their iPad. Note: On web, students will use the "when [key] pressed" blocks. On mobile, students will use the "when tilting [direction]" blocks.
- Some students might need reinforcement with how positive and negative numbers make changes in the x-direction, and how they make changes in the y-direction.
- Encourage them to test their code by moving the fish with all 4 arrow keys or tilt directions.
- Ask the students to notice what happens when the shark swims where the fish is: Have we created any code to make the shark eat the fish? No, so the shark doesn't eat the fish, because we haven't programmed it to do that! The computer or tablet only does what it is told!
5. "Collect the Coins" (puzzle)
- The coding for getting the coins and making the enemies end the game when touching the fish has already been done.
- The student is only asked to program the fish's responses to the 4 arrow keys or the 4 tilt directions, which should be fairly straightforward for them.
6-7. "Underwater Adventure" (DIY project)
- The Stage, basic Actors, and all Costumes for them have already been added.
- You may need to make clear to students that code blocks need to be put together for the three coins, the shark, and the fish. The fish should use all the same code blocks as the shark, but not the motion code! Movement for the fish will be controlled by the arrow keys on web or the tilt sensor on mobile.
Submariner badge earned!
Wrap Up and Extend the Learning
- Discuss with the class or individuals what type of coding they would need to add in order to program the shark to eat the fish. Students may recall from the last course that they can use a "When Occurs" block with a "Touching?" condition inside it to sense when the shark touches the fish. What would we want the fish to do when it's touched? Probably just make it disappear. What type of code block helps us do that? The "Hide" block. If they want to get fancier than this, we could first program the shark to show some animated eating motions, since right now the shark opens and closes his mouth every now and then regardless of where the fish is. How would we code this? When the shark touches the fish, we could change to a Costume that has his mouth open, then when the fish disappears, change to a Costume that has his mouth closed.
- Another question to ask the class or individuals to push their understandings: Why did we need to add the Point in Direction  Degrees block in the fish tutorials and puzzle after the "When Right Arrow Pressed" or "When Tilting Right" block was used? This may not be clear to all students, because they may think, well, the fish is already pointing to the right, why do I have to do that? But the fish won't actually always be pointing to the right, if the last key pressed was the left arrow key or the last direction they tilted was left. So this covers that situation, when the fish was pointed left. And if it was already pointing right, then using the "Point in Direction  Degrees" block doesn't hurt anything.
US Standards Addressed
- 5.G.1, 5.G.2
- 6.NS.5, 6.NS.6
- 3.RI.3, 3.RI.5, 3.RI.7, 3.RF.3 3.RF.4, 3.L.4
- 4.RI.3, 4.RI.7, 4.RF.3, 4.RF.4, 4.L.4
- L1:3.CT.1, L1:3.CT.4, L1:6.CT.1, L1:6.CPP.1, L1:6.CPP.5, L1:6.CPP.6, L1:6.CPP.8
UK Standards Addressed
UK equivalent grade/class - Year 4/Year 5/Year 6
National Curriculum of England (Computing)
understand what algorithms are, how they are implemented as programs on digital devices, and that programs execute by following precise and unambiguous instructions
create and debug simple programs
use logical reasoning to predict the behaviour of simple programs
use technology purposely to create, organise, store manipulate and retrieve digital content
design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
use sequence, selection, and repetition in programs, work with variables and various forms of input and output
use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
select, use and combine a variety of software (including internet services) on a range of digital devices to design and create a range of programs, systems and content that accomplish given goals, including collecting, analysing, evaluating and presenting data and information
design use and evaluate computational abstractions that model the state and behaviour of real world problems and physical thinking (KS3)
understand several key algorithms that reflect computational thinking (for example, ones for sorting and searching); use logical reasoning to compare the utility of alternative algorithms for the same problem (KS3)
Mathematics Standards, Year 4/Year 5/Year 6
identify, describe and represent the position of a shape following a reflection or translation, using the appropriate language, and know that the shape has not changed