Starting from:

$29.99

World Coordinates, Ratio, and Framework_Project 3

World Coordinates, Ratio, and Framework

 

Utilizing the SimpleFramework class create a simple game (described below). The game must be created using World Space Coordinates as discussed in class (as opposed to Screen Coordinates) and use a viewport that maintains World ratio when the window is resized.

 

Cannon Ball Command

 

The game you are going to be making is a take on the classic vector graphics arcade game, Missile Command. In Missile Command you must protect cities from incoming missiles by destroying them with your own missiles. Cannon Ball Command is a simplified version, in which cannon balls are raining down on the city and can be stopped by clicking on them.

 

The city is broken up into destructible blocks. If a cannon ball hits a block it is destroyed. The game is over when all blocks have been destroyed.

 

Some of the game mechanics are left up to you, but your version of Cannon Ball Command must have the following at minimum.

Multiple destructible city blocks
Cannon Balls are subject to some form of gravity (not necessarily realistic, you’ll probably want to slow it down a bit to make the game more possible)
Cannon Balls are also subject to a varying over time horizontal “Wind”
Cannon Balls should appear round-ish (don’t worry about drawing circles, rather use polygons of multiple sides)
Cannon Balls fall from the top of the screen at a random starting position
The rate of Cannon Balls spawning increases over time
Some method of scoring, which is displayed to the player
Cannon Balls are eliminated by the player left clicking on them with a cursor
When application is started, game does not start immediately, game starts when player hits Space
Once game is finished a new game can be restarted by hitting Space Bar
 


Class Design

 

There are a lot of elements to even a simple game. Plan and design classes and methods accordingly. In the previous assignment you created a VectorObject class, this can be modified to take the World Coordinate Viewport into account.

 

For example, you will have many city blocks. Have a single city block class that defines what the block looks like as defined around the origin, create multiple instances of it translating it as necessary. DO NOT create a separate block class for each block you will have. Then perhaps a CityBlockManager class that handles the logic for all of the blocks.

 



On start up

 



Game in progress

 



Lost some of the city

 



Things are getting crazy

 

Other Notes

 

Use a wide screen ratio, a wider play field makes the game more interesting.

 

We have not yet discussed proper hit detection, but we can cheese it a little for this.

For city blocks, they can be destroyed if the center of a cannon ball passes by it.

For determining if a cannon ball was clicked on, define a logical square around it, if the position clicked was within the square then eliminate the cannon ball.

 

To determine if a point is in a square, given the coordinates of its four corners and the point that is being checked:



 

The point must be to the right of the left wall and to the left of the right wall and below the top and above the bottom. If and only if all of these are true, the point is interior to the square.

Note that since it is an un-rotated square, x1 = x3, x2 = x4, y1 = y2, y3 = y4, this fact may be of some help to simplify your check.

 

 

Many of the games specifics are up to you, and may take a little trial and error and tweaking. The rate at which cannon balls fall (as long as it increases over time), size of cannon balls, the gravity applied, how wind is used and changed, the number of city blocks, and how score is determined. Discuss these in the Design Document. Part of your grade will be determined based upon how these factors contribute to the game itself.

 

Grading Rubric

Your submission will be graded on the following points for the given values:

 

Class Design Document – 5 points

Class Design – 10 points

Game Flow – 5 points

Input – 5 points

Score – 5 points

Wind – 5 points

Hit Detection – 10 points

City Blocks – 5 points

Cannon Balls – 5 points

Mechanics – 10 points

World Space – 20 points

Aspect Ratio – 5 points

Other Requirements – 10 points

More products