This is my final project for CS476A. The main requirement was to bring together the main ideas of the course in an aesthetic, artful, piece of music software. I was inspired to make a puzzle game after thinking about how I wanted to design the user experience. World of Goo and the Misadventures of P.B. Winterbottom are two of my favorite games in this genre and I absolutely love how such level-based puzzle games can engage users deeply while also being digestible in little pieces at a time. So...I present Sound Surfer, a sound-based puzzle game!
The main objective of the game is guide balls from a source to a sink (or multiple sinks) by drawing lines with the mouse. The secondary objective of this game is to engage users with sound on many different levels.
The first way I represented sound here is visual. Sound consists of waves, and one way waves are often drawn is as a concentric series of circles emanating from some central point. I used this familiar visualization to turn sound into a gameplay mechanic in Sound Surfer, where the circular waves will actually push particles around the screen. Sound sources can actually have a different "frequency" and will emit audible sound of the corresponding pitch when a ball passes through its radius of influence.
I also tried to integrate properties of sound into the puzzle gameplay. One idea is resonance, the phenomenon where a sound source can affect a particular object more than other objects at some specific resonant frequencies. In Sound Surfer, the balls on screen will only be affected by sound sources that emit a sound of the ball's "resonant" frequency.The other property of sound that I tried to work into the gameplay is destructive interference. When sound waves overlap, they can actually cancel each other out if the trough of one signal matches the peak of another one. I tried to include this phenomenon into the gameplay by making sound sources cancel each other's repulsive forces where their fields of influence overlap. Of course, this is not modelling interference in a physically correct way, but it gets the idea across and is much easier for the player to understand.
Finally, actual, audible sound is used as a key gameplay element in Sound Surfer. The player needs to guide balls from the source to a sink, but that catch is that they won't know which sink each ball belongs in unless they listen carefully to the balls. Every time a ball hits a surface, it will *plink* and the user needs to send the ball to the sink with the matching sound. (This puzzle element could probably be replaced by color coding the balls and the sinks...but that's much too easy! And that's been done before...)
Sound Surfer uses a forked version of box2d as its physics engine. It was built on top of OpenFrameworks with OpenGL, a custom RtAudio wrapper class for multi-source sound synthesis, and the ofxBox2d plugin.
Game levels are stored as text files in a straightforward format. This makes it easy for users to create customized levels.
The gameplay for Sound Surfer evolved a few times during development. Originally, my intention was for the user to simply place sound sources on the screen, and use these sound sources to push the balls around indirectly. However, it turned out using sound sources to manipulate the balls in this way had very low precision, making it frustratingly difficult for the player to make balls move in the desired direction.
The next iteration of Sound Surfer changed so that users manipulated balls by drawing lines on the screen. This is much closer to the final version, except that the lines were free-form instead of straight. Although free-form lines allow for more gameplay flexibility than straight lines, it turned out that smooth lines were very hard to draw. Most players had shaky hands and that led to little imperfections in the line surface that affected the rolling balls in undesirable (if expected) ways.