whistle pongbat
DESCRIPTION
Peter Capraro Michael Hankin Anand Rajeswaran. Whistle Pongbat. Concept. “Mortal Pongbat” meets “Brick” Paddle Control Options Noise Controlled Paddle Frequency Controlled Paddle Slide Whistle for more consistent sine waves Slide Whistle/Microphone Controller. Rules. - PowerPoint PPT PresentationTRANSCRIPT
Whistle Pongbat
Peter Capraro
Michael Hankin
Anand Rajeswaran
Concept
• “Mortal Pongbat” meets “Brick”
• Paddle Control Options– Noise Controlled Paddle– Frequency Controlled Paddle
• Slide Whistle for more consistent sine waves
• Slide Whistle/Microphone Controller
Rules
• User scores if ball gets to right side of screen– Computer “blocks” protect that side
– Bullet system to destroy blocks
• “Computer” scores if ball gets to left side of screen– User has the paddle to protect this side
– Paddle gradient to alter direction of ball movement
• Game played to 5 points
Architecture
Audio Controller
• Uses CODEC for analog to digital conversion
• Splits clock to package sound byte WAV format (taken from MindTunes group, 2008)
• Passes 16 binary bits as converted integer
VGA Controller
• Component attributes passed from software– Paddle– Ball– Score– Blocks– Bullet
Address Data0x00 Paddle Height0x01 Ball X Coordinate0x02 Ball Y Coordinate0x03 User Score0x04 Computer Score0x05 Block 1 (Top Block)0x06 Block 20x07 Block 30x08 Block 40x09 Block 50x0A Block 6 (Bottom Block)0x0B Bullet Indicator0x0C Bullet Charging Counter0x0D Bullet X coordinate0x0E Bullet Y coordinate
Software• Paddle Control
– Integer representation of WAV format• Positive Numbers: 0 - 32,767
• Negative Numbers: 65,536 - 32,768
• Bullet Control– Three hits to charge
– One more hit fires
– Destroys one or two blocks
• Ball Control– Motion
– Direction
Frequency Algorithm• Tested In MatLab
– Slide whistle showed decent sine wave
– Broke down at extreme frequencies
• Algorithm– Essentially reduce to square
wave
– Average consecutive period measurements
• Frequency still inconsistent when frequency moved quickly– Solution: Tell user to move it
slowly
Paddle Movement Mechanism
• Problem– On average, calculated pitch followed expected
pitch– Wide and Constant Oscillation
• Solution– Extreme High and Low boundary values
required to change direction– Reaching boundary just once begins consistent
motion
Lessons Learned
• FPGA Board and hardware/software communication
• The importance of setting clear, simple, and testable goals
• Don’t reinvent the wheel…but don’t trust that it turns correctly in the first place.
• Not easy to work when somebody is always whistling annoyingly in the lab.