Smackathon 2014 - Magic Piano on the PS Vita
18 Apr 2014Today wrapped up Smule’s first Smackathon (a Smulean hackathon) of 2014. Armed with clairvoyant vision and a burning desire to be amazing, The Backstreet Trolls (me and Josh Wu) set out to port the popular Magic Piano to the PlayStation Vita.
Sony provides development tools for building and running applications on a Vita. The language of choice is C#, which provided a nearly seamless transition for someone coming from Android (Java) development. Contrary to its name, C# is actually more like Java than C. Fortunately, Sony also provides a bunch of great examples we were able to mess around with. The IDE – PlayStation Mobile Studio – wasn’t great. It confounded us many times with odd behavior and unhelpful error messages. When you think Eclipse is a better IDE, you know you’ve got some problems.
Josh took care of everything audio. For the actual piano sounds, we implemented a system similar to the Android version of Magic Piano: we played sounds from a bank of sound files. Josh also handled converting some songs into a format that our application could parse. I took care of the rest: reading in the music files Josh wrote up, placing the notes on the screen, and making them fall gracefully down the screen. Within a day, we had a prototype.
With 24 hours left, we knew that there was much room for improvement. I took the the road more travelled and made tweaks to gameplay, optimized texture loading and sprite rendering, and *gasp* refactored and cleaned up our code to make it more maintainable and extendable. But Josh took the road less traveled. I added a button for enabling “troll mode,” and let Josh run wild. In troll mode, the images representing notes became Smule employees making troll faces, and the piano sounds were all replaced with us singing our approximation of said notes. He took the road less traveled, and it made all the difference.
Our project was awesome. All the Smuleans put in great effort and it’s pretty spectacular what we all produced in such a short amount of time. The Backstreet Trolls are eagerly looking forward to the next Smackathon, which will close out what should be an eventful 2014!