Whack-A-Mole reinvented, with small children and potatoes…
Video soundtrack by the bleeping fabulous Chipzel.
This is what happens if you buy a MaKey MaKey interface board for your kids, can’t find any suitable games, and want an excuse to hack something together with the Loom game engine. The game is a modified version of one of the Loom demos (added keyboard support, added sound, modified gameplay).
The game is free to download:
What you need in order to play…
- Apple Mac running OSX or a Windows PC
- MaKey MaKey (if you want to play with vegetables – you can also play using the keyboard)
- Vegetables or fruit of your choice (or anything else vaguely conductive…)
- OSX: Download the package, run it and follow the instructions. If all goes well, you will get a WhackAPotato icon in your Applications folder.
- Windows: Download the zip file. Unzip it. Run WhackAPotato.exe.
If you have problems running the program on Windows then it may be because you have an old display driver. Check with your graphics adaptor manufacturer to see if there is a newer display driver available.
Connect 3 potatoes with wires to the A, S, D terminals on the edge of MaKey MaKey. You can easily make the connections with the standard crocodile clips, but 1/4″ audio jacks (e.g. guitar/instrument cables) are particularly satisfying to plug into potatoes!
Connect another object (banana, lemon etc…) to one of the EARTH terminals at the bottom of the MaKey MaKey. You need to hold this while playing the game to complete the circuit when whacking the potatoes.
- Plug in the MaKey MaKey to a USB port on the computer.
- Test the potato controllers by opening a text editor or terminal window, holding the EARTH connection (banana) in one hand and hitting the potatoes with the other hand. The potatoes should display “A”, “S”, “D” when hit from left to right.
- SPACE: Start game
- A, S, D (potatoes!): Whack moles
- F: Toggle fullscreen mode
- ESC: Quit
Customising with your own pictures
By default the game comes with moles to whack.
- Create the bitmaps.
- The bitmaps need to be “png” format with dimensions of about 178×200.
- If your bitmaps are a different format (e.g. jpg) or size, then load them in an image editor (e.g. OSX Preview or Windows Paint) and save them as PNG using File/Export.
- Edit the bitmaps to make the background transparent. A really useful tool for removing image backgrounds is Clipping Magic. It currently only works with Chrome and Firefox. Alternatively, you can erase background areas in OSX Preview by selecting areas and clearing them with the backspace key. The Smart Lasso is helpful in selecting background areas.
- Copy the bitmaps into the application:
- Open the Finder and go to the Applications folder
- Right-click on WhackAPotato and select “Show Package Contents”
- Navigate to Contents/Resources/assets/sprites
- Navigate to the assets\sprites directory
- Replace mole_1.png, mole_2.png, mole_3.png with your own bitmaps (the filenames must stay the same). Do not replace mole.png – this is just a copy of the original bitmaps in case you want to revert to moles.
The code is open source. If you want to hack around with it, download from github.
MaKey MaKey is a small board that allows you to interface everyday objects to your computer. The board looks like a keyboard to the computer, and when you touch an object it looks to the computer as if a particular key has been pressed on the keyboard. Which key is pressed is determined by where you connect the wires to the board.
You can control many existing games and apps with no changes to the apps. For example, if you find Super Hexagon too easy when playing with the keyboard, for an extra challenge you can hook up potatoes as the left/right keys.
Loom game engine
The Loom game engine is a new 2D game engine aimed at development of casual mobile games.
It uses an ActionScript based language for scripting, and has an impressive mechanism for dynamically reloading assets while the game is running, reducing development time. Check out the cool demo video:
Group Makey Makey sessions
I have put together a page with ideas on how to use Whack-A-Potato for a group Makey Makey education session.
Whack-A-Potato is not just for kids – grown-ups love it too!
Read how Debbie Ding produced a customised Whack-A-Carrot game in 45 mins.
All out of potatoes? Don’t be afraid to try with other vegetables or fruit!
I used carrots was because I only had carrots left in the house after having boiled all my potatoes to make mash earlier in the day.