Tag Archives: pydance

Dance Dance Revolution on the OLPC XO?!?

Originally published onĀ joviko-olpc.blogspot.com January 5, 2008.

Dance Dance Revolution on the OLPC XO?!? Can it be true? Well, sort of. There’s a nice open-source DDR clone calledĀ pydance that is fairly XO-friendly. It is written in Python, doesn’t need gamer-l33t hardware to run, and gives a nice imitation of DDR.

Here’s a really lame video I shot of Pydance on the XO:

Here’s the songs I’ve created so far to use with Pydance on the XO:

I tried a few other DDR clones, and they either take a lot of work to get running on the XO, or need high-end hardware features.

I’ve created a first pass at a XO Activity that can be downloaded and installed. I would very much appreciate people trying it out and letting me know if it works for them. I don’t think it requires any software packages installed before it to run, but I could be mistaken, as my XO now has a lot of stuff installed on it, so it is hard for me to tell.

I inclulded a couple of songs and dance tracks with the Activity so you can use it right away. But that does make the download larger, over 8 MB. Both songs are now Creative-Commons licensed; the song “Wolfie” is one that I created, with profound apologies to W. A. Mozart.

The Pydance Activity “.xo” file can be installed via the standard Journal method, but for now I advise using the Terminal and doing it by hand.

Also, the installed Pydance Activity can be run from the “Activity launcher” screen, but it currently has some issues. It is better to run it from the Terminal.

So, without further ado, here is one way to get and run ‘pydance’ on the XO:

  1. Fire up wifi networking on your XO.
  2. Start up the Terminal activity.
  3. In the terminal activity, type in this:

    wget ‘http://joviko.net/download/pydance.xo’

  4. This will take a while, since the file is over 8 MB. If it finishes really quickly, you probably don’t have wifi working on your XO.
  5. Type in this:

    sugar-install-bundle pydance.xo

  6. This will also take a couple of minutes. You should see lots of information about things being extracted, inflated, created, etc.
  7. At the end, you should see:

    /usr/bin/sugar-install-bundle: ‘pydance.xo’ installed.

  8. That’s it! You’re ready to play Pydance!

Now that you have it installed, the best way to run it is from the terminal. This will take a bit of typing:

python Activities/pydance.activity/PydanceActivity.py

HINT: The Terminal program has a very handy “typing autocompletion” feature. You can just type in part of a filename or program name, and press the “tab” key (|<– over –>| on the XO keyboard). This makes typing in the above line faster (“{tab}” means “press the tab key”):


When Pydance starts, it should begin by playing music and displaying a menu. (If it doesn’t do this, let me know!) The mouse cursor will disappear. You can move between the menu items with the up and down arrow keys. Go ahead and select “Play Game” by pressing the “enter” key.

On the XO, you’ll want to select a “4 panel” pad (so you can use the arrow keys on the keyboard or on the XO’s display bezel). Use the up and down arrow keys to move to “4 panel” and then press “enter”. Do this again to select “Single” mode (just one player, not two), and “Normal” (not repeating).

Another screen will appear, with the two songs that are available. Select either one using the up and down arrow keys and “enter”. You can change the difficulty level by pressing the left and right arrow keys.

Now get ready! Notice that there are 4 “empty” arrows at the top of the screen. Arrows will slide up from the bottom of the screen and fill the empty arrows. When one of the empty arrows is filled, press the corresponding arrow key on the keyboard (or on the display bezel). Repeat over and over until the song ends. You want to press the key at the exact moment that the arrow at the top of the screen is filled in. The more accurate the timing of the presses, the higher your score.

When you are done playing, press the “solid X” key in the upper-left corner of the keyboard (the Escape key). Do this several times to completely exit from the game.

NOTE: If you run Pydance from the “Activity launcher” screen, there currently are some problems:

  • The game doesn’t completely exit correctly. The icon for the game will be stuck in the “Activity ring”. To fix this, you must restart Sugar (press the “ctrl”, “alt”, and “erase” keys at the same time) which will kill ALL the Activities that are currently running, or restart the XO.
  • The game is really sluggish and stutters when the “DJ” speaks. This still happens a bit when run from the Terminal, but it isn’t nearly so bad.
  • The game’s icon isn’t quite perfect yet. Nobody ever accused me of being a great artist.

Here are some things to try if Pydance doesn’t seem to be working:

  • The “pydance.xo” file might have been corrupted during download. You can check this by running ‘md5sum’ on the file:

    md5sum pydance.xo

    The result should look like this (for the old version, no longer available):

    e50f202a82013cb3f9e752be5b6cfdce pydance.xo

    or like this (for version 2):

    df93ea251a1a1708037897434489d8c3 pydance.xo

  • It could be that the ‘sugar-install-activity’ didn’t finish right. You can try to manually reinstall Pydance from the “.xo” file like this:

    cd Activities
    unzip -o ../pydance.xo