Reverser!, no scratch that, Deceptive Platformer again

Update (10/8/2010): Deceptive Platformer: BABYCASTLES EDITION is the build that we had on display for Babycastles at Chashama. It takes the newer music system, but retains the old sequence of 4 stages. We know you love that last jump at the end–it’s back! Also, we had tried to make a less obvious name than Deceptive Platformer, but Reverser never seemed to stick.

Here is the game I’ve been working on polishing for the last couple of weeks.  Reverser Deceptive Platformer started as a Global Game Jam game, winning Best Overall Game at the NYU Jam Site. You can check out our GGJ Profile, play the old version, or click the link below this screenshot to play the latest version. If you play the work in progress, be sure to see what happens if you keep falling off the platforms during the first couple of levels. If you manage to get to the advanced levels, I’m afraid the “finale” music will loop continuously, as these levels were added to the build after the music states had been written.

Click Here To Play Work-In-Progress Version of Reverser

This year was the first year I had participated in the Global Game Jam. Once we had mingled and thrown a bunch of ideas around for a while, we joined teams based on game ideas that had been pitched. I joined a team making a game called Deceptive Platformer (the theme for the jam was “deception”). The primary gameplay mechanic revolves around how landing on different colored blocks will alter your controls (left, right jump).

  • Green blocks are normal
  • Red blocks reverses Left and Right while you’re on them
  • Cow blocks reverses Left and Right for all blocks after the cow block (in effect, Red and Green switch)
  • Blue blocks send you flying forward
  • Yellow star/coin/pickup tiles flip the world and gravity upside down.

Since I’m a composition student, I wanted to tackle the music first. Everyone generally agreed the music needed to have the funk, but still be cute. Originally I wrote 4 cues (Menu, Levels 1 through 4) that were simple nodes that would transition from one another on the beat. After the jam we decided to polish the game and give it 10 levels rather than 4. So, I revised the music system to use stems instead of straight loops. I was able to do this because of the CompuPhase mp3loop utility, which will take a 16 bit WAV file, encode it with LAME, and then shave off empty frames, and time stretch audio in the last frame to give the illusion of looping.The music system (now dubbed DeceptiveSoundtrack), run as a finite state machine. The SoundtrackManager class will receive cues from the player about statuses such as jumping, death, or platform impact, and then trigger sound effects accordingly. At the same time, SoundtrackManager maintains a current and previous MusicState object that updates every loop, polling global game variables to check what level the player is on, and how many times they’ve died. If the player has gotten to the next level, it will tell SoundtrackManager to transition to the next MusicState and adds musically-timed cues to the CueManager (which holds a reference to a currently playing sound that acts as a “shared timeline” like in FMOD’s music editor) for playing drum fills and lining up the next set of stems (which may or may not already be playing). If the player has died a lot, it will slowly fade out stems of the music. The image below is a rough UML class diagram of how all the components of DeceptiveSoundtrack interact with each other and the rest of the game.