This activity, designed for a 6th grade math class, guides students through creating a Halloween-themed game on Scratch or Snap! that reviews the coordinate plane and introduces variables through scorekeeping. Students had previously coded the Click Alonzo game from UC Berkeley's Beauty & Joy of Computer Science curriculum to review the coordinate plane.
The Halloween Game, which I designed, builds on student's knowledge of x- and y-coordinates by having them code a keyboard-controlled main character (witch) as well as obstacle and reward sprites that move randomly on the screen. Students also used positive and negative integers for scorekeeping, as the user could lose or gain points depending on which sprite they collided with.
Overall, students enjoyed building their games, showcased their creativity by adding extra features and sprites, and demonstrated a solid understanding of x- and y-coordinates.
Halloween Game: move the witch with the keyboard keys! Try to collect pumpkins (+1 pt) and avoid the ghost (-1 pt).
Code a Halloween Game self-guided handout: