Whack-A-Potato

Whack-A-Mole reinvented, with small children and potatoes…

Demo

Video soundtrack by the bleeping fabulous Chipzel.

Background

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).

Installation

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…)

Program install:

  • 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.

Software troubleshooting

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.

Hardware setup

  • 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!
    potatoes
    potato_connection
    makey_keys
  • 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.
    banana_connection
  • 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.

Keys

  • 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.

mole_screenshot
You can replace the mole bitmaps with your own pictures (of children, grown-ups, pets, vegetables…) without any code changes.

  1. 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.
  2. Copy the bitmaps into the application:
    • OSX:
      • Open the Finder and go to the Applications folder
      • Right-click on WhackAPotato and select “Show Package Contents”
      • Navigate to Contents/Resources/assets/sprites
    • Windows:
      • 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.

Source code

The code is open source. If you want to hack around with it, download from github.

MaKey MaKey

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.

makeymakey02

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.

Further inspiration

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.

Whack-A-Carrot

Comments

  1. Whaaaaaaaat!!! That is seriously cool! We’re giving you a forum title for that!

    I’ve been tempted to make Whack-A-Mole easier so that my little kid could play it, seems like you had the same idea… then turned it to 11!!

    Awesome stuff!

  2. That is probably one of the strangest and coolest things I’ve ever seen built on tech I’ve worked on. Awesome work! :)

  3. Thank you for creating and sharing Whack-A-Potato. I absolutely love this kind of stuff and even better it uses Loom!

    The video is GREAT!

    Happy Loom coder is happy!,

Trackbacks

  1. John Batty shared this wild MaKey-MaKey Monday treat with us — and I have been looking forward all weekend to sharing what is potentially the most energetic “whack-a-to-tato”(sic) performance in a software demo put together by humans […]
    http://www.adafruit.com/blog/2013/06/17/open-source-customizable-whack-a-potato-game-for-your-makeymakey-makeymakeymonday/

  2. […] John Batty shared this wild MaKey-MaKey Monday treat with us — “what is potentially the most energetic “whack-a-to-tato”(sic) performance in a software demo put together by humans. Batty designed this great game app and shared his code, so that you, too, can create a customized “whack-a-mole” style game, populate it with your friends (enemies? vegetables?), and unleash the boundless energy of clever children upon it.” (read more) […]

  3. […] It only takes a few minutes to turn children, friends (or enemies!) into moles… More details here… […]

  4. […] is an open source game made with Loom and MaKey MaKey. You can find more info about the project at its official website, or go straight for the source […]

  5. […] by Whack-a-Potato, I decided to make a Potato Piano, using a MaKey MaKey, a laptop and 8 potatoes. This is a pretty […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: