FINAL PROJECT: Sycorax

Ross Dunkel

interStoryDrift screenshot

An ear-training game that pays homage to the classic 1981 Atari vector graphics tube space shooter Tempest. The game borrows its name from the "vicious and powerful witch and the mother of Caliban" from Shakespeare's Tempest.

Motivation:

I have been an on-again off-again jazz piano player with a good ear and bad study habits for most of my life. Most of the time I would rather be playing a game than studying music theory! As part of a program to get more serious about studying music once and for all, I have been looking for fun ways to insert music education into my everyday life. As such, I thought that my Music 256 final project presented the perfect opportunity to build something to speak to this need: an interval identification ear-training game!

So the first piece of the puzzle was in place, but an interval identification ear-training game can take many forms. The next key idea came (as usual) in the shower: why not make a throwback to the classic games I used to see in arcades as a kid in the 80s! Tempest has a geometry-centric design aspect that lends itself to mapping to the musical staff, why not do something like that?! Sounds great, but let's throw in the weapons power-up system of the classic Gradius! Yeah! But what to use as source musical material? CLASSIC NES MUSIC OF COURSE! These became the core elements of the design of Sycorax.

Design:

The design and gameplay of Sycorax takes more than a few cues from Tempest. The player's claw-like yellow ship is constrained to move on the near edge of a three-dimensional shape made up of 12 flat sectors extruded into a tube-like hollow 3d shape. Each sector of the game board corresponds to a pitch of the 12-tone equal temperament tuning system.

Classic NES music is played using Fluid Synth's soundfont synthesizer and player API using a soundfont made up of 8-bit NES-style samples. MIDI note-on events on channel 0 are intercepted as they are sent from the player to the synth. Enemies are released from the far end of the playing field in the sector corresponding to the MIDI key (modulo 12) of the played note. Rules guarantee that not too many enemies come out at once and that they are relatively evenly distributed across the staff.

For each level two special musical intervals are specified. Whenever these intervals are played with both notes triggering enemies, there is a chance that the interval will also trigger an interval identification event. When this occurs the enemies representing the notes in the interval are colored green and the interval is repeated on the synth for the user to hear. Game time then slows to a crawl granting the player a short period to identify the interval. The player selects the interval by manuevering their ship to the sector corresponding to the number of semitones between the two notes and pressing the space bar or return key.

If an interval is correctly identified, the player's powerup meter gains an additional charge. The player's current powerup level is indicated by a grey box around the powerup. If the indicated powerup is not currently active, the user can press either shift button to apply the powerup, resetting the powerup meter to zero. Power-ups that have been applied are displayed in green text, those not applied are indicated in grey (see below: rapid fire and option are currently engaged with the powerup meter currently charged up to the "rapid fire" level, though if you tried to engage rapid fire at this point it wouldn't do anything since rapid fire is already enabled... duh...).

Care was taken in the design of the game mechanics (player movement/mouse mechanics, enemy hold-off timings, etc.) to make it satisfying both as a shooter and a musical education device.

Keys:

  • Return (enter) - On the idle or game over screen, this starts level 1. During interval identification can be used to select interval.

  • (space bar) - During regular gameplay can be used to shoot. During interval identification can be used to select interval.

  • z - Fire super zapper (if charge remains), killing all enemies on the board.

  • shift - Enable currently charged powerup (in not already enabled).

  • (right and left arrow keys) - Move clockwise and counter-clockwise during gameplay and interval identification.

Power-ups:

  • Rapid fire - doubles the rate of player fire rate

  • Max bullet count multiplier - increase the number of player bullets allowed on the board at any given time from 8 to 12

  • Option - two friendly purple orbs float on either side of the player and provide additional firepower!

Implemented levels:

In the future, it is my intention that level design consist simply of specifying a MIDI file, the two active intervals, and the hold-off params. This can all be contained in an .XML or .PLIST file and would allow for easy level creation by game-players, adding a social aspect to the game. It also would allow and easy mechanism for the sale of add-on level packs to game-players. The architecture for handling such level files has yet to be implemented.

Implemented board geometries:

Closed boards wrap back on themselves and so the player can continuously move from sector 11 to sector 0. Open boards do not wrap)

  • Regular dodecagon: closed (see above)

  • Flat: open

  • V: open

  • Stair: open

  • "Foxy:" closed

  • "Bitstream:" open

Easter Eggs (that aren't Easter Eggs because I'm telling you about them, but they're still cool):

  • Press 't' during gameplay to enable board color rotation. Trippy dude!

  • Press 's' during gameplay to toggle "1981 Arcade Ambiance." This gives you the aural sense of what it would have been like to stand in front of a Tempest machine the year the game came out in an arcade full of other games buzzing and bleeping away.

TODO:

  • Many bug fixes and much code cleanup!

  • Implement transitions between levels

  • Fluidsynth player needs to be removed for two reasons 1) using it forces me to be reactive instead of proactive (in re: MIDI note-on events) and 2) it seems to be impossible to stop one sequence and start another cleanly. I would prefer to do MIDI-file analysis up front analyzing a file and designing a level up front and then use a home-spun sequencer. This will clean up a whole lot of issues with MIDI event callback and should increase performance by front-loading enemy/interval selection logic.

  • Allow tuning of level difficulty by exposing enemy holdoff parameters in an intelligent way.

  • Different types of enemies would be nice.

  • Eventually it would be nice to track users' performance in a central database. This would allow the game to automatically select intervals intelligently based on the player's past performance to tailor the difficulty of the level.

  • This software is written with only OpenFrameworks and FluidSynth, no OF add-ons whatsoever. It is my hope to open source the code once it is cleaned up a bit.

Binary:

Requires Fluid Synth which can be downloaded and installed using the Mac OS package manager Homebrew via the simple command "brew install fluid-synth"

Created using openFrameworks 0.9.0 on Mac OS X (10.11.1) in Xcode 7.1.1.