From GGCWiki
Jump to: navigation, search

Prepared for Creative Programming for Digital Media & Mobile Apps offered June 2013 by Coursera

Project Overview

Title thumbnail
Project 1 GD Visualizer RLutzCreatProgProj1GDVisualizer.jpg
Project 2 Testy Trebuchet RlutzTestyTrebuchet.png

Project 1 - Grateful Dead Visualizer



Processing 2.0 project zip file

Explanatory video here



This project creates an interactive sound visualizer. It has these main behaviors:

  • alternates between two Grateful Dead tracks retrieved from the Intenet Archive
  • fades tracks in and out while overlappng them (fading was performed externally in audio editing software.)
  • slows down/speeds up animations gradually based on the intensity of the music
  • presents animation in three dimensions, using a red/cyan anaglyph
  • accentuates heavy bass graphically by magnifying the size of a rotating cube
  • generates and animates a number of playing cards that spin around in space (based on John Whitney's algorithm)


  • the viewer can slow down/speed up the music track with the 's' and 'f' keys
  • the viewer can narrow/widen the the inter-ocular distance with the DOWN/UP keys

Viewing Notes

  • this sketch was developed and tested on a desktop Processing 2.0 configuration. (It doesn't appear to work properly on a javascript or android deployment.)
  • The viewer really needs to view the experience with a pair of red/cyan anaglyph glasses. Without these, the image looks out of focus and is not a very good experience.



Anaglyph code adapted from

Visualizer code from Mick, Marco and Matthew from University of London's Creative Programming

Grateful Dead images

Playing card images

Project 2 - Testy Trebuchet





I always thought it would be fun to have a trebuchet launcher in Angry Birds. Additionally, I was curious about the workings of a trebuchet and how it differed from other ancient war machines such as a catupult, siege engine or ballista. This was the genesis of my project.

After some googling, I learned that a trebuchet works much like a golf swing. A counterweight is drawn up to an initial starting position, and then gravity acts to lower the weight. As the weight drops, an opposing lever propels a sling which releases at a preset angle. I could have hard-coded the the initial weight height and release angles, but thought it would provide better challenge and sport to allow a game player to interactively select these. Again using the golf swing analogy, I modeled Testy Trebuchet to work much like an interactive video game of golf.


Interactivity should be pretty self-apparent, especially for anyone who has played Angry Birds. The part that's differnt is the launching. The player depresses the mouse, holding the mouse button down until the counterweight is raised to the desired height. The stabilization block is removed as soon as the player depresses the mouse. Once the player releases the mouse, she waits until the machine reaches the desired launch orientation releasing the projectile with a quick click of the mouse button.

Additionally, the following hot keys are implemented:

  • r reset
  • q quit
  • a arm weapon (for the impatient)
  • p pause (not normally needed)
  • s disable/enable sounds

Viewing Notes

  • this sketch was developed and tested on a desktop Processing 2.0 configuration.
  • deployment on javascript, android or ios was not pursued




  • free music from here
  • paid for catapult sound effect here
  • other sounds from the family's summer cabin (slamming door, creaking door)
  • Audacity for audio editing

Processing and JBox2D


  • angry birds reference image
  • model for boulder
  • Gimp software for image creation, editing and cleanup

Ideas for Enhancements

Of course, as any programmer knows, working on this project generated lots of ideas for enhancements:

  • different boulders (size, density, restitution)
  • more / better sounds
  • more sounds added for collisions
  • generate synthesized music which is intergrated to game play
  • add more materials: wood beams, obstacles
  • add more levels
  • acknowledge great performance, such as noting when the player knocks everything down on the first throw
  • add sliders (linear or radial) that show power and release of trebuchet
  • parameterization and removal of magic numbers in code
Personal tools