interactive multimedia
lab 4 - Stadium Vendor
Kevin Scott
Spring 2008
Spring 2008
Directions:
- You are the stadium vendor. In fact, you are such a good stadium vendor that the stadium management has decided to fire all the other vendors - the entire stadium is yours to satisfy!
- User your mouse to move left or right in the stadium.
- When a patron is hungry or thirsty, they will yell out what they want and start waving their hands. After 20 seconds, and every 20 seconds thereafter, if you do not satisfy their desire, they will yell again and start waving faster and wider.
- Move your mouse cursor over the patron to deliver your products.
- Enjoy!
Game Construction
- SeatingSection Class - The SeatingSection class is responsible for building a seating section on a Sprite. This class randomizes the color of the patron's shirt and whether the patron is a man, woman, girl or boy.
- Patron Class - The Patron class is responsible for all things related to an active patron. It handles the timing for the patron wanting something, and then the randomizing what the patron wants. Calls to the sound effects class are from the Patron class, as are the arm waving motions. The arc of the patrons wave, and the speed at which they wave are managed through gets and sets on this class. Proximity to the mouse cursor is handled from this class.
- InactivePatron class - The InactivePatron class generates all the non active patrons. Inactive patrons were used to reduce the computing load of the game.
- SoundEffects Class - Utility class that handles all my sound loading and timing - reused with minor modifications form the lab 3 image browser project.
- RandomUtils Class - The RandomUtils class is a class with static methods for simplifying the generation of random values; i.e. RandomUtils.returnRandomBool() returns a random true or false, RandomUtils.returnFloorInt(intMaxValue:int) returns a random integer from 0 to the max value provided inclusive.
- If you want to hear your voice in the game, send individual wave files to kscott4<AT>comcast<dot>net with subject line: vendor game sounds - I can use variations on - want beer, want candy, want popcorn, wrong order, thanks, and hurry up. Be creative - just try to keep the files small.
- If you want to see your face in the game - send a png of around 90x100 to same address with subject: vendor game faces and I'll work you in.