Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your task is to recreate the following simple game Balloon Pop. Balloon Pop has red and green balloons that fall from the top of the
Your task is to recreate the following simple game Balloon Pop.
Balloon Pop has red and green balloons that fall from the top of the screen the player clicks anywhere inside a balloon with the mouse to pop it
Popping a green balloon adds to the score, popping a red balloon subtracts from the score.
Please read all the instructions before you start. You will be developing the game in incremental stages. Each stage carries marks. You must submit versions of your game at these different stages of completion.
Generic Instructions
All solutions must be written in Java.
You are highly recommended to use GameEngine.java and you are allowed to modify it if you wish.
Try to complete as many features as you can within the time available, marks will be awarded for partial solutions.
The balloons do not have to look like those in the following screenshots, a solid circle is fine.
Submission Instructions
Upload your code in a zip file generated by IntelliJ or the IDE of your choice using the upload forms for questions and
This test is an individual test, do not share any details of it with other students. You may not copy any code from other students but you can use code from any of the course examples or your assignment
Comments
If you wish to make any comments about decisions you made or problems you encountered, please enter them in the text field for each question.
Stage marks
The game window is x pixels with a black background.
Balloons have a random radius of between and pixels. You are free to choose the method to create the balloons either geometrically create them or use opensource images.
There is a chance that a balloon is red and a chance that is is green.
Balloons start with their centre at a random x position between their radius and the width of the window minus the radius.
Balloons start with a y position of minus the radius ie off the top of the screen
The speed of the game is determined by a variable speed calculated as follows:
speedtime since game has started in seconds;
Balloons have a constant random y velocity between and plus speed pixels per second speed ~ speed
The time in seconds between balloons appearing is:
a random double precision number between and speed
Stage marks
If the player clicks a point inside a balloon, it should pop.
When a balloon pops, the balloon should disappear and an animation lasting seconds should start showing an expanding circle starting at the radius of the balloon.
When a balloon is popped, the popwav sound should be played available as a download in this test Download audio here
If the player clicks a point inside more than one balloon, they should all pop.
If two balloons are touching, when one of them is popped, they both pop this is recursive so all balloons touching a popped balloon and balloons touching them will pop
Subsequent pops can either start immediately or can start after the animation has played.
Stage marks
The time since the start of the game and the score are displayed on the screen, top left.
The time should have decimal places.
The score starts at
When a green balloon is popped, the score increases by when a red balloon is popped the score decreases by When a green balloon goes off the bottom of the screen without being popped the score decreases by
If the score goes below the game is over.
When the game is over, the time should be displayed with a message saying GAME OVER! and Press Space to Restart
The user can restart the game by pressing the space bar.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started