Lesson plan

Build a rhythm game lesson plan

A rhythm game in three builds: notes that fall in time, buttons that judge your timing, then the whole game with combos and a high score.

1 chapter, 3 lessons, about 3 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Make notes fall to a song, judge a press to the millisecond, then play the whole game.

Materials for the whole unit

  • Addressable RGB LEDs
  • Arduino Uno R3
  • Character LCD with I2C backpack
  • Half breadboard
  • LED arcade button x 4
  • Piezo speaker
  • Resistor

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 3 h

Lanes, buttons, game

Make notes fall to a song, judge a press to the millisecond, then play the whole game.

LessonTimeWhat students do
Make the notes fallA 16 x 8 WS2812 panel becomes four lanes of falling notes, timed so each one lands on the bottom row exactly as the piezo plays it.55 min
  1. Four lanes
  2. Watch them fall
  3. Hear the song
  4. Lanes from pitches
  5. Round again
Hit the beatFour lit arcade buttons and a 16x2 LCD: press on the click and see perfect, good or miss, measured to the millisecond.45 min
  1. The score screen
  2. Lit buttons
  3. On the beat
  4. Off the beat
Play the rhythm gameFalling notes, lit buttons, timing windows, combos, a score on the LCD, a song on the piezo and a best score that EEPROM keeps.80 min
  1. Ready
  2. Start the song
  3. First hit
  4. Combo
  5. The song plays on
  6. A miss
  7. Best score

Materials

  • Addressable RGB LEDs
  • Arduino Uno R3
  • Character LCD with I2C backpack
  • Half breadboard
  • LED arcade button x 4
  • Piezo speaker
  • Resistor

Check for understanding

Each student finishes "Play the rhythm game" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Best score".

Your class

Teach this unit as a class

Start a class from this course and its 3 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.