Gameplay in HTML5: Homework #8


  1. Create a library module Audio.js with general routines for handling Web audio.
  2. Obtain some music and sound-effects files. Good sources include You can edit audio files and convert between formats using Audacity.
  3. Create a module for audio specific to your game, e.g., FreeCellAudio.js. Set up a map that uses game event designations (e.g., "jazz_music", "move_card") as keys; and as values, strings or objects that you can pass to your library to play. Then write a function to play any of these by name.
  4. Place calls in your game code to play music and sound effects using the above module when the triggering events occur. (E.g., when the player wins, play a "win" sound.) When the app switches screens, it should probably stop all sounds.
  5. Archive your files. E.g.:
    tar -czvf Gameplay_8_MyName.tgz directory
    (Please do not include jquery.js or modernizr.js files in the archive. Links are OK.)
    E-mail the archive to the instructor.