Friday Post: StepMania on Raspberry Pi2

Hey All!

So this week the Raspberry Pi Foundation released a new version of Raspbian that includes experimental support for OpenGL.  This is a big leap from OpenGL ES.  This is real OpenGL that tons of games and software use.  No mobile versions required anymore.  That being said, its super experimental.  It basically breaks the official screen and the camera doesn’t work.  It also only works in xwindows and not on the command line.

BUT! One of my favorite games (and the way I lost 50lbs) is now available on the Pi!  StepMania!  The Dance Dance Revolution simulation game!

Here’s how to compile it:

First clone the StepMania repo:

git clone https://github.com/stepmania/stepmania stepmania
cd stepmania

Install the dependancies:

sudo apt-get install cmake gcc g++ libmad0-dev libgtk2.0-dev binutils-dev git-core make libasound2-dev yasm libc6-dev libogg-dev libvorbis-dev libbz2-dev zlib1g-dev libjpeg8-dev libpng12-dev libxtst-dev libxrandr-dev libglew-dev libglu1-mesa-dev mesa-common-dev automake autoconf libva-dev

A lot of these you will probably already have installed.

Now cd into the Build directory and start the configuration process (and run it one more time afterwards)

cd Build
cmake ..
cmake ..

Now you will want to edit the CMakeCache.txt which has some of the configuration options.

nano CMakeCache.txt
Look for CRASH_HANDLER and set it to OFF, SSE2 should be set to OFF, and Full Release should be set to ON.
press ctrl-x then y to save.

Now lets compile StepMania!

make

Let that run until it is done, should take about 3 or 4 hours.  When it’s complete run

cd .. 
./stepmania

and you should now be playing StepMania!

All of your configurations  will be under ~/.stepmania, and your songs and stages go under ~/stepmania

Have Fun!

Also, GO SEE DEADPOOL (if you are 18 and older!!)

-Shea

17 thoughts on “Friday Post: StepMania on Raspberry Pi2

  1. I was getting this ERROR “gcc: error: unrecognized command line option ‘-msse2’” when I tried to compile it on Ubuntu Mate.

    After doing those CMakeCache.txt changes now it is breaking with errors like:
    stepmania/src/generated/config.hpp:267:21: error: expected unqualified -id before ‘int’
    #define lrintf(x) ((int)rint(x))
    ^
    stepmania/src/generated/config.hpp:267:21: error: expected ‘)’ before ‘int’

    Maybe, I should try it on Raspbian?

  2. this is cool. I will try to build it on my rpi2 tonight.

    Just on question. Are the inputs laggy ? or the synchronization beetween song and step perfect ? if not it will be difficult to play.

    I will still give it a try.

  3. I’ve been desperately looking all over for any info on getting the pi to run stepmania, thank you so much! Have you tried it on the Pi 3 yet? Any improvement? Really hoping to someday stuff a raspberry pi into a dance mat and have it work as a standalone game.

      • Hi Shea,

        Could you post the commands you ran to compile and run this on the Rpi3? I’ve been struggling with it for a day or two now. I can get it to compile with specific options (mainly WITH_MINIMAID=0), but the game segfaults when it launches. I really appreciate it!

          • Yep, I just discovered that option by accident this morning when I needed to turn on the GPIO pins. I’m surprised its not enabled by default. Thanks for the suggestion, though!

            Unfortunately I had the same results you mentioned, marginally better performance as far as CPU utilization but still pretty much unplayable. Too bad, but maybe eventually an iteration of the RPi will work for this.

  4. Tried today (with last github release), and i get:

    Linking CXX executable ../../stepmania
    /usr/bin/ld: ../../extern/libmmmagic/linux-32bit/libmmmagic.a(mmmagic.o): Relocations in generic ELF (EM: 3)
    /usr/bin/ld: ../../extern/libmmmagic/linux-32bit/libmmmagic.a(mmmagic.o): Relocations in generic ELF (EM: 3)

    Seems, somehow, it is trying to create x86 binaries on the raspi.

  5. Everything went swimmingly installing it on my Pi3 until the end where I got this error :

    Scanning dependencies of target StepMania
    [ 44%] Building CXX object src/CMakeFiles/StepMania.dir/GameLoop.cpp.o
    c++: error: unrecognized command line option ‘-msse2’
    src/CMakeFiles/StepMania.dir/build.make:54: recipe for target ‘src/CMakeFiles/StepMania.dir/GameLoop.cpp.o’ failed
    make[2]: *** [src/CMakeFiles/StepMania.dir/GameLoop.cpp.o] Error 1
    CMakeFiles/Makefile2:388: recipe for target ‘src/CMakeFiles/StepMania.dir/all’ failed
    make[1]: *** [src/CMakeFiles/StepMania.dir/all] Error 2
    Makefile:137: recipe for target ‘all’ failed
    make: *** [all] Error 2

    Any ideas?

  6. Hi,

    I did everything listed and once it gets to the end of compiling step mania I’m given this error :

    /usr/bin/ld: ../../extern/libmmmagic/linux-32bit/libmmmagic.a(mmmagic.o): Relocations in generic ELF (EM: 3)
    /usr/bin/ld: ../../extern/libmmmagic/linux-32bit/libmmmagic.a(mmmagic.o): Relocations in generic ELF (EM: 3)
    ../../extern/libmmmagic/linux-32bit/libmmmagic.a: error adding symbols: File in wrong format
    collect2: error: ld returned 1 exit status
    src/CMakeFiles/StepMania.dir/build.make:10475: recipe for target ‘../stepmania’ failed
    make[2]: *** [../stepmania] Error 1
    CMakeFiles/Makefile2:388: recipe for target ‘src/CMakeFiles/StepMania.dir/all’ failed
    make[1]: *** [src/CMakeFiles/StepMania.dir/all] Error 2
    Makefile:137: recipe for target ‘all’ failed
    make: *** [all] Error 2

    Any ideas on what’s up?

  7. I keep getting an error when running cmake ..
    The error is:
    — Configuring incomplete, errors occurred!
    See also “/home/pi/Downloads/OpenITG beta 2/stepmania/Build/CMakeFiles/CMakeOutput.log”.
    See also “/home/pi/Downloads/OpenITG beta 2/stepmania/Build/CMakeFiles/CMakeError.log”.
    Am I doing something wrong here?

  8. I try to install the necessary packages with the command:

    sudo apt-get install cmake gcc g++ libmad0-dev libgtk2.0-dev binutils-dev git-core make libasound2-dev yasm libc6-dev libogg-dev libvorbis-dev libbz2-dev zlib1g-dev libjpeg8-dev libpng12-dev libxtst-dev libxrandr-dev libglew-dev libglu1-mesa-dev mesa-common-dev automake autoconf libva-dev

    but I get dependences error:

    Los siguientes paquetes tienen dependencias incumplidas:
    libsdl1.2-dev : Depende: libdirectfb-dev (>= 0.9.22) pero no va a instalarse
    E: Error, pkgProblemResolver::Resolve generó cortes, esto puede deberse a paquetes retenidos.

    My raspberry is 2B

  9. Hi, I was able to run StepMania 5.1 on Raspberry Pi 3. I’ll leave here the steps I’ve followed.

    If anyone want to build your own, you can download my Script Installation and it will do everything for you.

    I saw some people with errors at comments, you need specific CMake Flags to solve them, as I’ll show below.

    Besides CMake Flags, I got two other errors, RAM Memory and CMake version. I solved RAM Memory with a temporary swapfile of 2GB and CMake problem I download and compile the right version. (all of this was made inside my script).

    In order to get as light as possible OS, I used Raspbian Jessie Lite.

    Process:
    Update system:
    sudo apt-get update
    sudo apt-get install

    Install Dependencies
    sudo apt-get install gcc g++ libmad0-dev libgtk2.0-dev binutils-dev git-core make libasound2-dev yasm libc6-dev libogg-dev libvorbis-dev libbz2-dev zlib1g-dev libjpeg8-dev libpng12-dev libxtst-dev libxrandr-dev libglew-dev libglu1-mesa-dev mesa-common-dev automake autoconf libva-dev libjack-dev xinit xserver-xorg xcompmgr

    Install CMake 3.2 (you may need to download and compile, or install my arm binnary version)
    wget https://drive.google.com/open?id=0B1m_0sI14Wr1LW9FRHBkeHEtLW8
    sudo dpkg -i cmake_3.2.3-1_armhf.deb

    Download, compile and install StepMania
    git clone ‘https://github.com/stepmania/stepmania.git’ stepmania-src
    cd stepmania-src
    git submodule init
    git submodule update
    cd ..
    mkdir sm5-build
    cd sm5-build
    cmake ‘../stepmania-src’ -DCMAKE_INSTALL_PREFIX=’../’ -DWITH_FFMPEG=1 -DWITH_MINIMAID=0 -DWITH_CRASH_HANDLER=0 -DWITH_SSE2=0 -DWITH_FULL_RELEASE=1 -DWITH_GLES2=1 && make install -j8

    Run it with:
    xinit /home/pi/stepmania-5.1/stepmania — :9

    —————————————————————

    Using my script
    wget https://drive.google.com/open?id=0B1m_0sI14Wr1LW9FRHBkeHEtLW8
    wget https://drive.google.com/open?id=0B1m_0sI14Wr1YkdXbmJxOTd4Wlk
    chmod 775 StepMania_Raspbian_Lite_Install.sh
    sudo ./StepMania_Raspbian_Lite_Install.sh

    —————————————————————

    If anybody got a better sound quality, please, let me know

    • I’ve been trying to run by your instructions on my Rpi3, but am getting similar errors that other users are reporting on the final compile. I’ve tried to download your run scripts, but get a 500 Internal Server Error. I am running the most up to date version of cmake, but did the full install rather than your arm binary version because I also got a 500 error when trying to download your script for that. Any advice?

Leave a Reply

Your email address will not be published. Required fields are marked *