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
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:
- The stationary arrow at the top of the screen which will be the original arrow.
- 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:
- If the moving arrow is not located on top of the stationary arrow the variable ‘flash right’ is equal to 0.
- 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:
- ‘flash right’ is equal to 1
- 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:
- Makey Makey
- Aluminium foil
- 1m x 1m cardboard (or plastic mat)
- Sticky tape
- Book cover adhesive (contact)
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.
The dance mat arrow has 3 layers which you can see on the image of the dance mat:
- The larger aluminium foil triangle, which is connected to the corresponding Makey Makey arrow (5 volts)
- 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.
- 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.
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.
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, 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.