Review: Interactive Animation
Expected Time: 45 - 60 mins.
Students will be able to apply these concepts:
- Review how to add Actors, add Costumes, animate, move, handle key press events, use loops for repetition, use delays, and play sounds.
- Create an underwater adventure game involving moving and animating fish, and avoiding enemies.
Tynker Videos Used
- 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
- (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.
1. "Concepts" module (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. A video reminds students how to add a costume to an Actor.
- Code Blocks and Loops - Adding a code block to an Actor programs that Actor what to do. A video reminds students how to add and remove code blocks. Repeat and Forever blocks make looping happen for the code blocks inside them.
2. "Swimming Fish 1" module (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.
- 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.
3. "Swimming Fish 2" module (DIY project)
- Students add on to the coding they did in the previous module, allowing the user to move the yellow fish in all 4 directions with the arrow keys.
- 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.
- 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 only does what it's told!
4. "Collect the Coins" module (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, which should be fairly straightforward for them.
5. "Underwater Adventure" module (DIY project)
- The Stage, basic Actors, and all costumes for them have already been added.
- In Step 1, you may need to make clear to students that code blocks need to be put together for the three coins, the shark, then the fish. The fish should use all the same code blocks as the shark, but not the move block! Movement for the fish will be controlled only by the arrow keys.
- In Step 2, students need to remember to first select the Stage icon, then its Settings menu, then the Sounds tab, in order to Add Sound to it.
- Help students who don't remember how to find code blocks they want to use: either by using the search bar in the second column, or by choosing one of the categories of blocks to look through, like "events" or "motion."
- In Step 3, they add more Actors from the Media Library - the Ocean category is the natural place to look. They are also told to get an Actor that has multiple costumes - to see this, they can hover their cursor over each Actor and see if that Actor comes with a set of costumes. They will find the only Ocean Actors that come with multiple costumes are the first seven Actors in the Creatures section.
- They might need help remembering after they add a new Actor how to get a good size for it. They do this by selecting it on the stage, and dragging its borders. They should also drag the Actor to the location on the stage that they want it to start.
- In Step 4, in addition to adding code for the arrow keys, students need to change the "jellyfish" and "eel" in the Touching? blocks to the Actors they just added instead.
- In Step 5, to add the sound, they need to select the Settings on each coin, then the Sounds tab, then search for the "game gain point" sound.
6. Take Quiz, then 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 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. 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