Project 3 Spec

Project 3 Spec - Spring 2009 CS 31 P Programming Assignment...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Spring 2009 CS 31 Programming Assignment 3 P Guitar Zero Time due: 9:00 PM Tuesday, April 28 Introduction The SmallSoft Corporation has decided to develop Guitar Zero, a music video game suspiciously similar to one distributed by Activision. In this game, a player must press buttons on a plastic stick in accordance with the sequence of symbols that appears on a screen. (That description sounds pretty dry; the entertainment comes from the fact that the plastic stick is in the shape of a guitar, a familiar rock song is playing, the symbols appearing on the screen represent finger positions on the neck of a guitar as a model of the notes to be played in time with the beat of the song, and the player can fantasize that he/she is actually talented enough to be up on stage.) The symbols are five colored discs: green, red, yellow, blue, and orange. Here's an example. You can also go to the Coinz arcade game room on the A-level of Ackerman Union (across from Taco Bell) and try a drum version of the same idea yourself. A full Guitar Zero system has songs that require a player to press more than one button at the same time, simulating a chord. For this project, we will assume something simpler: All songs require pressing at most one button per beat. A press is either a normal note , where the player presses and releases the button on the same beat, or a sustained note , where the player presses the button on one beat, and then keeps it there, lifting it off at a later beat. We have acquired some Guitar Zero software that will display on a screen the sequence of colored discs for a song. The software requires as input a string of characters; each character is an instruction for what to display for one beat of the song. The characters are:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
g , r , y , b , or o , meaning to display a green, red, yellow, blue, or orange disc, representing a normal note. G , R , Y , B , or O , meaning to display a green, red, yellow, blue, or orange bar, representing a sustained note. x , meaning to display nothing for this beat, indicating that the player must not press any button for this beat. (Notice that the instructions gggb and GGGb are different. The first means "press and release the green button for each of the first three beats, then press and release the blue button", while the second means "press the green button on the first beat, hold it there until release it at the end of the third beat, then press and release the blue button".) Now for the bad news: The game artists who encode the songs are used to expressing them a different way. For them, a song is expressed as a string like r//y/3g///o/ , where a slash terminates every beat. This means "For the first beat, press and release red. Press nothing for the second beat. For the third beat, press and release yellow. Starting on the fourth beat, press and hold the green button three beats (the fourth, fifth, and sixth). For the seventh beat, press and release orange." Your assignment is essentially to translate a song from the artists'
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Project 3 Spec - Spring 2009 CS 31 P Programming Assignment...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online