Bubble Shoot By Julia, Ashwin, Duc and Maxwell

Content

 For our project, we created a game called Bubble Shoot.  The purpose of the game is to shoot all the bubbles before your opponent.
 
The user interface includes a motor with a wheel attached to a touch sensor.  The motor can be turned using the wheel attached to the motor.  When the motor is turned, a small rectangle moves left/right at the bottom of the screen.  When the touch sensor is bumped, a small circle shoots out of the rectangle.  When the small circle intersects with one of the bubbles, the bubble disappears.
 
We displayed the game on the front panel.  The game runs on the computer, and pictures are wired into the 2d picture.  Input is taken from the motor rotation and touch sensors.  The program first randomly generates 10 circles (bubbles), and stores them in an array.  A square is also generated, and moves along the x axis when the motors are rotated.  If the touch sensor is pressed, a small circle is shot out of the square at the x value read by the motor at a constantly increasing y value.  If the center of the shot circle intersects with one of the “bubbles” the “bubble” is erased from the array as the loop is updated.
 
One challenge we faced was making the bubbles disappear permanently after the shot circle intersects.  Before, the circle would only disappear when the circle intersected, then reappear when the shot circle was no longer overlapping.  To solve this problem, we figured out that we needed to update the array by deleting the intersected bubble.  Another challenge we faced was making sure the shot circle intersected with the bubble.  Before, we had the y value of the shot circle center increasing by 100s, but this would cause the shot circle to skip over the bubbles, so they wouldn’t disappear.  We changed the shot circle y value to increment by 10s instead of 100s so the shot circle would pass through the bubble instead of skipping it over.

Gallery
Video
Attachments
AttachmentTypeSize
roboticsgame3_582a389f7de66robotics game 3.vi41.17 KB

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *