Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Individual Assignment

Rework Asteroids to have a different gameplay

In the previous assignments, we have developed an Asteroids game. In this assignment, we are going to use the same codebase to develop a different gameplay. The inspiration for this is Osmos, in which you control a circular "ship" that moves slowly through space and bumps into enemy circles. The collision response is that the bigger circle "eats" the smaller circle. To move on one direction, the player's ship expels a tiny fragment of itself in the opposite direction. We will be exploring variants of this different gameplay in this assignment.

Please develop the code in Java Mode. Java Mode means that each class must be in a separate file. Here is some new starting code: that builds Asteroids in Java Mode.

This project is bigger than assignments 3 and 4 and will require to you think through things in advance. You can re-use the structure we have built throghout the term.

Visual Design Matters! Grades will partially depend on how the games looks.

Common Features

  Player Ship Appearance:

  • Your ship must be either a nice-looking sphere (left image above), or a nice-looking sphere with a "mouth" (middle image above), depending on variant.
  • For mouth ships, the mouth gap must be no more than 3/4 of the diameter of the ship. The middle image above shows a ship with such a mouth.
  • The mouth can be any shape. I have used a cirle in the images because it was easy to draw.
  • Mouth collision: Test if the point on the circumference is within the enemy ship's circle. The right image shows a small yellow star where the circumference point would be.

Player Ship Motion:

  • Your ship moves by expelling tiny spheres opposite to the direction of motion. As Isaac Newton said: Every action has an equal and opposite reaction.
  • The mass of the player's ship is equal to its area. Expelling small masses decreases the mass of player's ship, and thus its area.
  • Clicking the mouse left button sets the direction in which the mass is expelled. When the mouse is pressed, construct a vector from the player's ship to the mouse location.
  • The mass expelled is 1% of the mass of player's ship.
  • The expelled masses join the collection of masses floating around in the play area. That is, they become enemy ships!

There are many instances of an enemy ship in the play area. Each enemy ship interacts with all of the rest of enemy ships and the player ship.

Enemy Ship Appearance:

  • Each enemy ship is a circle.
  • Each enemy ship starts with a random area.
  • Enemy ships are red if bigger than the player's ship, and blue if smaller.

Enemy Ship Motion:

  • Each enemy ship starts with a random velocity.
  • Enemy ships drift passively.

The primary variations of this game are how the enemy ships in the scene move and respond.

Each enemy ship must be tested for collision with all other ships, including the player ship.

Required Features

  • 0 or 7 or 8 Big Mouth

?  The player ship has a "mouth". This means that the player must be able to rotate the ship.

?  The player ship eats smaller enemy ships that fall into the player ship's mouth. At least test if the circumference point falls within the enemy circle.

?  When the player ship collides with a larger enemy ship, the enemy ship slowly "eats" the player ship incrementally according to the amount of overlap between the two ships. The player ship can get eaten!

?   Enemy ships eat each other according to overlap.

All ships "loop around", as in asteroids.

Java, Programming

  • Category:- Java
  • Reference No.:- M9524716

Have any Question?


Related Questions in Java

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As