🗒 Cheat Sheet← Lesson
BitWithBite
Pygame Mastery Worksheet

🎬 Animation

Module 7 of 20 · Level ★★☆ · Time: 35 min
SCORE___ / 20
NameClassDate
After this worksheet you can
Cycle animation frames on a timerDistinguish looping vs one-shot animationsTime animation by elapsed dt, not frame countDesign a reusable Animation Manager
📚 Quick Recap

Animation is a list of frames advanced on a millisecond timer, not once per loop iteration — looping states like idle/walk repeat forever, while one-shot states like attack/death play once and hold or trigger an event.

🧠 Section A · Concept Check ● INTERMEDIATE 4 × 1 = 4

1Why advance animation frames based on elapsed time (dt)?
2Which animations are typically one-shot?
3In a reusable AnimationManager, when should frame_index reset to 0?
4What should happen after a death animation's last frame plays?

🧮 Section B · Problem Solving ● INTERMEDIATE 2 + 3×3 = 11

5A running animation is often the walk cycle played .
6The variable that accumulates milliseconds since the last frame change is usually called the .
7Write the condition that advances to the next frame once anim_timer reaches ANIM_SPEED, wrapping back to 0 if at the last frame.
8Why should jump animation typically not loop?
9What two pieces of data does an AnimationManager need per animation name?

🚀 Section C · Challenge ● CHALLENGE 5

10If your AnimationManager resets frame_index to 0 every single frame instead of only on a name change, describe exactly what the player would see on screen.
💭 Reflection — the most useful thing I learned:
A ___/4   B ___/11   C ___/5   Total ___/20 Teacher's Signature Parent's Signature
✂ answer key — fold or cut before handing out

1-B   2-B   3-B   4-B  |  5 faster   6 anim_timer (or animation timer)   7 = if anim_timer >= ANIM_SPEED: anim_timer = 0; frame_index = (frame_index + 1) % len(frames)   8 = it represents a single rise-apex-fall arc; looping it would make the character appear to jump repeatedly mid-air instead of holding at the peak/landing   9 = the list of frame images for that animation, and its playback speed/whether it loops  |  10 = the animation would appear frozen or stuck flickering on frame 0 every frame, since it never gets the chance to advance to frame 1 before being reset back to 0 again

📄 Need offline practice?Download the print-ready PDF or open the one-page cheat sheet.
⬇ Worksheet PDF 🗒 Cheat Sheet