Sunday, July 11, 2021

Sing on Raspberry Pi with Ultrastar DX (Singstar-Like)

🕐🕐 Duration: Up to a few hours
🔧🔧 Difficulty: Medium
🌟🌟🌟🌟 Interest: Hours of fun

[Update January 10, 2022: Added RetroPie support; Added linking to external hard drive songs directory; changed difficulty to medium and time to "A few hours"]

Hello dear readers,

After having covered more or less all the available emulators on Raspberry Pi, I have been focusing myself on native gaming solutions. 

So far I have encountered little success. I have been trying again mkxp-z and also crossuo. Both give the same result so far: compilable but not runnable unfortunately.

In this grey sky, we can however see some sunshine. I was trying to play on SingStar on my PS4 and the server was down. Then I asked myself: is there maybe a clone working on Raspberry Pi?

After some research, I met UltraStar DX. So what?

Is it good?

First good news: on Raspberry Pi OS, if you follow the compilation guide there: https://github.com/UltraStar-Deluxe/USDX#compiling-on-linuxbsd-using-make, it will work perfectly with almost no difficulty (assuming you apt-get all the deps on the first line of the compilation instructions). You will however have to be careful on a few pointers:
  • You'll need a Pascal compiler on your Raspberry Pi (sudo apt-get install fpc) which will use quite much disk space. make sure to be ready with "df". You should free more or less 2GB for the software to work and to avoid compilation fails.
  • Songs are installed in ./game/songs. You will start with no songs. Most song providers are easy to find on internet and most will require at least a subscription. Giving pointers on how to gather songs is out of scope of this guide. Make sure you get your songs legally. You can also make your own songs.
  • There's no song pack like on Singstar, they have to be added one by one.
  • Every song is a folder with 4 files: 1 movie, 1 text, 1 mp3, and one video (mp4). Together they will make between 50 and 100 mb per song so make sure not to crowd your SD Card too much and prefer mounting ./game/song/ directory to an external storage device. The most important files are the txt and mp3. You can safely remove the mp4 reference from the txt file (it's completely editable) to gain some performance, but you will lose the video.
    [Update January 10, 2022]
    Here is an example of binding an external hard drive containing your songs

    cd ~/USDX/game
    mv songs songs_bak
    # Raspberry Pi OS
    ln -s /media/pi/ABCD-1234/songs/ songs
    # RetroPie

    ln -s /media/usb/songs/ songs

    Replace ABCD-1234/songs by your hard drive id and path to your songs on your hard drive (If you are using RetroPie, your main USB directory is always the same).
    Using ln -s instead of mount --bind should help you not to have to redo the same operation everytime you start Ultrastar.
  • Some intensive songs (the ones who close 100 mb) will give a jerky movie on Pi 3 and older.
  • You will need as many microphones as there are players.
  • Ultrastar doesn't install easily under RetroPie as it is xwindow/xserver based. If you want to be safe, stay on Raspberry Pi OS + RPD
    [Update January 10, 2022]
  • See hereafter if you want to install Ultrastar DX on RetroPie.
  • See this post if you are experiencing sound issues

Playing

Playing is almost the same as in Singstar for Playstation. However, let's face it, Singstar is more beautiful. It's a bit like comparing MS Office to Open Office: everything works in Open Office, but it doesn't really feel the same way. However everything is serviceable and there still are advantages, as you don't really need Singstar server to be up to browse songs.
You can theme up your Look'n'feel, you'll see hereafter that I themed it with Winter theme and green dominant colour. You have 2 built-in themes, if you want you can download others as well. 
Only the interface language is customizable (and there are a lot of available languages) and you can't really move any button. 
One interesting setting is the microphone latency. You might want to change that if you feel your microphone is late while singing.

Ultrastar settings Raspberry Pi
UltraStar settings interface with green color and Winter theme

Sometimes the game will crash before launching the song, if it happens just make sure every other app is closed and nothing is open in the song directory (eg. xterm). Strangely this did happen on an ARM build but not on my X86 build on my PC.

Finally, don't expect UltraStar to tell you you sing good if you sing bad (as Singstar does). UltraStar will tell you "you suck!" and that you sang like a monkey if you failed big time. At least, this game is blunt with you.

Raspberry Pi UltraStar game
In the middle of a game
 
[Update January 10, 2022]

Getting UltrastarDX to work in RetroPie

I've added this section because I've got demands to make UltrastarDX work in RetroPie.
Please note that the approach will be exactly the same as getting Wine games to work there: install an xwindow server: https://thepigamer.blogspot.com/2021/01/making-wine-and-box86-work-under.html.
 
So on with getting startx server to work. Leave EmulationStation ton console and type:

sudo apt-get install xserver-xorg xserver-xorg-video-fbturbo xinit xterm xdotool matchbox-window-manager

echo cd /home/pi/USDX/game;startx ./ultrastardx > /home/pi/RetroPie/roms/ports/usdx.sh

You should see a new entry in RetroPie:
  • Select "Ports" section
  • Browse to "usdx.sh"     

Conclusion

This game illustrates what I was clearing out in my performance advice threads: No the Raspberry Pi is not an asthmatic slow machine, and that's especially true in the late models. However the fact that the Raspberry Pi is often used as an emulation machine makes it spend a lot of CPU time in emulation. When starting a native game, and it has shown the same with Diablo II as well, this machine performs well and gives result with no problems. That's why I am currently looking at MMORPGs that can compile natively on Raspberry Pi and hopefully will produce out an article out of them in a fairly short delay. Until then, have fun with emulation and please avoid setting the weather to heavy rain by singing!

The pi gamer

No comments:

Post a Comment

Play ET: Legacy on Raspberry Pi [FPS]

🕐🕐 Duration: A few hours 🔧 Difficulty: Easy 🌟🌟🌟🌟 Interest: Hours of fun