Question: Develop a Bubble Burst game where the objective is for a player to burst all the bubbles on the playing field before the timer expires.
Develop a Bubble Burst game where the objective is for a player to burst all the bubbles on the playing field before the timer expires. points
Requirements:
I. The system shall have two GUls JFrames points
The first GUI shall have two Jbuttons Start and Restart and a JSlider. The Start button shall be used to start the game. Once it's pressed the second GUI displays and the game starts. Once the game ends, the Restart button shall be used to start the game over. The JSlider shall be used for the player to select the game difficulty: Easy bubbles Medium bubbles Hard bubbles
The second GUI should contain the field where the game will be played.
II The Playing Field
The playing field shall be defined as the dimensions of the JPanel.
III. RepositionGlobal points
For Round
The program shall prompt the user to define the origin for each bubble by clicking the mouse on the JPanel. If the user defines an origin that will result in a bubble not fully contained within the JPanel's dimensions, the program shall return an error and prompt the user to make another selection. Round shall start as soon as the number of user selections equals the number of bubbles for the specified game difficulty.
For Rounds
Positions or repositions bubbles circles by choosing random coordinates from the entire playing field. A Java random number functionmethod shall be used for any operation that requires randomness.
IV RepositionLocal
Repositions bubbles by choosing a random coordinate from each bubble's local neighborhood. The local neighborhood is defined as a subset of the playing field where the bubble is allowed to roam. For example, if a bubble's center coordinate is and we define a local neighborhood of then the bubble can take a random hop in the bounding box neighborhood
Neighborhoods are drawn as rectangles for each bubble. Bubbles make hops in their local neighborhoods until they are burst. Bubbles are not allowed to hop outside of the playing field. The local neighborhood expands as the rounds increase. Assume a neighborhood of for Round and increase by for each additional round.
v Collision Avoidance points
A bubble is not allowed to overlap or occupy the same space as another bubble.
VI Bubble Burst points
A bubble is burst once a player makes a mouse click inside any bubble circle Bubbles disappear once they are burst.
VII. Rounds points
A new round starts when all the bubbles are burst. New bubbles are then respawned using repositionglobal. The round number shall be displayed.
VIII. Game Over points
The game is declared over when the player clicks anywhere on the playing field, the player successfully completes rounds, or the player takes too long to finish a round. A JOption shall appear once the game is over, and it shall display "Game Over."
IX Timer points
The timer starts at the beginning of each round. As the rounds increase, the time to complete each round decreases. The round timer is seconds, and it decreases by second each additional round. The timer shall be displayed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
