Coding · Grade 9
Characters, Animation and Behavior
Learners animate sprites from elapsed time with looping and one-shot sequences, give a non-player character a patrol-chase-search-return state machine with hysteresis, find shortest paths on grids with breadth-first search and program routes with blocks, and tune behaviour so it is readable and fair through telegraphing, reaction delays and learnable patterns.
- 4 lessons
- About 100 minutes
- Check what you learned: 8 questions
- Ways to answer: program with blocks, choose an answer, trace code, type a number, put in order and sort into groups
What learners will discover
- Select animation frames from elapsed time for looping and one-shot animations.
- Model and trace character behaviour as a finite state machine, including hysteresis.
- Find and follow shortest paths on a grid with breadth-first search and block programs.
- Design behaviour that players can read and outplay, using telegraphing, delays and patterns.
Lessons
-
Sprite animation 5 steps2 practiceabout 20 min
-
Behaviour with state machines 5 steps3 practiceabout 24 min
-
Finding paths 5 steps2 practiceabout 24 min
-
Readable, fair behaviour 4 steps2 practiceabout 18 min
-
Check what you learned 8 questions at the end
Keep exploring
More 9th grade coding
- 9th Grade Coding Worksheets10 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read