Build your own Dance Dance Revolution game with Makey Makey and Scratch

At Fun Palace 2016 our homemade Dance Dance Revolution game was shown which was made using Scratch, Makey Makey and household items. It is easy, you can make it too. There are two parts to building the game: the software and hardware.


Write the code to build the computer game program

You can build the computer game using Scratch. Here is the finished Scratch game.

There are four arrows: up, down, left and right. Program one arrow at a time. After finishing the code, duplicate the sprite (object in Scratch) and change the arrow direction.

Let’s consider the right arrow. There are actually two right arrows:

  1. The stationary arrow at the top of the screen which will be the original arrow.
  2. The arrow which starts at the bottom of the screen and moves upwards to the stationary arrow. This arrow is actually a clone of the stationary arrow, it appears randomly at the bottom of the screen and then disappears when it reaches the stationary arrow.

The aim of the game is to press the correct arrow key when the moving arrow reaches the stationary arrow. Use a variable to define ‘states’, let’s call this variable ‘flash right’ because the arrow flashes yellow:

  1. If the moving arrow is not located on top of the stationary arrow the variable ‘flash right’ is equal to 0.
  2. If the moving arrow is located on top of the stationary arrow the variable ‘flash right’ is equal to 1.

Use this condition to determine whether a player can earn a point. The player earns a point when all these conditions are met:

  1. ‘flash right’ is equal to 1
  2. Right arrow key pressed

Create a new variable called ‘Score’ to keep score.

Once you have the right arrow working you can duplicate the right arrow sprite and create the other arrows: left, up and down.


Build the dance mat as your arrow keys

Use a Makey Makey and a number of household items to build the dance mat:

  1. Makey Makey
  2. Aluminium foil
  3. 1m x 1m cardboard (or plastic mat)
  4. Sticky tape
  5. Book cover adhesive (contact)
Finished dance mat

This is what a finished dance mat looks like

A Makey Makey works by closing circuits to trigger inputs e.g. pressing the arrow keys. You connect your hardware e.g. a dance mat to a Makey Makey. The arrow keys on the Makey Makey are connected to the corresponding dance mat arrows with alligator clip wires. Another alligator clip connects the earth on the Makey Makey with the earth of the dance mat arrows.

Makey Makey

Makey Makey

The dance mat arrow has 3 layers which you can see on the image of the dance mat:

  1. The larger aluminium foil triangle, which is connected to the corresponding Makey Makey arrow (5 volts)
  2. The medium size purple book cover adhesive layer which acts as an insulator. This middle layer acts as an insulator between the 5 volts and the earth.
  3. The smaller aluminium foil triangle, which is connected to the Makey Makey earth (refer to image of Makey Makey).

Connect the dance mat arrows to the edge of the cardboard by creating aluminium foil ‘wires’. Then connect the alligator clips to the edge of these wires. Use copper tape, or aluminium foil and sticky tape works the same.

Dance mat arrows

In this current state the dance mat has four open circuits: up arrow, down arrow, right arrow and left arrow.

The player needs to stand on the dance mat with bare feet, which allows the player’s body to act as a conductor thereby closing the circuit when the bare foot touches both the 5V and the earth components of the dance mat arrow.

Dance mat in action

Dance mat in action

Then you have the computer game program which you developed in Scratch and a dance mat as your input device for the game. Connect the dance mat to the Makey Makey and  connect the Makey Makey to the computer. Now you have it! Your very own homemade Dance Dance Revolution game made from Makey Makey, Scratch and household items.

About the author

Emily de la Pena

Emily de la Pena

Emily de la Pena, Founder of Coding Kids.

Coding Kids is developing the next generation of coders, creators, innovators and change makers. We are striving for: All Australian children coding by 2020! We run school holiday code camps, after-school coding clubs and professional development workshops for educators. Children build their own computer games, animation movies and digital solutions. Through fun and and play children discover computational thinking, design thinking and entrepreneurship.

Listen to Emily’s interview on ABC Radio

Watch Leeanne Enoch MP give Emily her award as Community Digital Champion