Computer Science 335

Fall 2010

Final Project Option

TANKS

Overview: Tanks is a project based on the Wii Play game of the same name! It is a single-screen, real-time 2-player game. The difficulty in this project lies in the implementation of some physics mixed with animation scenes.

Description:

A game of Tanks is played in real time. Two players over a network connection, or one player against a computer opponent, maneuver their tanks on the screen, firing missiles at each other while moving around the screen. The game ends with one player's missile has struck the other tank, destroying it.

ANIMATION

Movement of a tank and firing both take place in real-time. When a player fires their missile, the missile should be animated moving across the screen until it hits an obstacle, an outer wall, or an enemy tank. After the missile has exploded, it does not need to continue existing. Explosions should be animated.

WEAPONS:
Each tank has a cannon, which the player fires by pointing and clicking. When a player fires a missile, they may not fire another missile until their first missile has exploded. Because the field on which a game takes place may have obstacles, they will usually have to have a direct line of sight to the other player to fire a missile. Missiles do not travel instantly across the map—its velocity should be slow enough that, if fired at a distance, a quick opposing player may be able to dodge the missile. Missiles should be able to destroy certain types of obstacles. If a missile enters into any part of a square on the map that contains a tank or destroyable obstacle, the missile and the object in that square both explode.

NETWORKING (two-player mode):

Each time a player moves, their game should send a message to the other player's game, and the movement should be animated on both screens. Similarly, when a missile is fired, a message should be immediately sent to the other game and animated on both.

AI (one-player mode):

In addition to being able to play over the network, you should be able to play as a single player against a computer opponent. The computer opponent should behave as an opponent—it should have the same tank and same restrictions for movement and firing as any player does.

MAP:

Several maps should be available for players to attack each other against. The game is played with a top-down perspective, so each player can see both tanks and any obstacles on the map. Obstacles should be stationary, such as walls or columns, and some should be destroyable and others not. A map does not need to extend outside of a single screen, with minimum dimensions of 120 square units or larger (that is, you can have maps that are 8x15, 10x12, 20x25, etc.)

MOVEMENT:

Tanks take up a 1-unit-by-1-unit space and can move horizontally, vertically, or diagonally to any adjacent space that does not contain another tank or an obstacle. Movement should be animated, but either player can perform movement in real-time at will.

Expectations: Tanks lends itself well to object-oriented design concepts. You are expected to follow all of the object-oriented we have covered this semester—you are expected to make use of inheritance, polymorphism, and design patterns from class when they are appropriate.

Requirements:

  • One player should be able to play a game on a single computer against an AI opponent.
  • Two players should be able to play a game against each other over a network connection.
  • The game should be real-time, with movement and firing being resolved simultaneously on both players' screens.
  • In two-player mode, there should never be discrepancies between the two players screens (accounting for lag in sending and resolving actions is acceptable, but a block being destroyed on one map and not on the other is not!).
  • There should be at least five different rectangular maps to play on with variety in layout and obstacle types.
  • Tanks must be able to move, and their movement must be animated from one square to another.
  • Tanks must be able to fire missiles at any angle, though each tank cannot fire a second missile until its first one is destroyed.
  • Missiles should be animated as they move across the screen, and should destroy enemy tanks or destroyable obstacles.
  • Tanks must not be able to move through obstacles or off the edge of the map.
  • There should be at least two different types of obstacles—good ideas are stationary obstacles, obstacles that can be pushed, and obstacles that can be destroyed by missiles.
  • The game should repaint correctly. When the game is minimized and then restored, the scene should be unchanged.
  • Animations should be performed smoothly and should not interrupt gameplay.
  • Turns should be implemented in such a way that a real-time timer ends a player’s turn, or firing a shot will end the turn
  • The game should know if a player has won or lost
  • You should be able to play multiple games without having to exit and re-run the program
  • Game should keep track of total score between two players

Iteration 1:

+25 Analysis and Design Artifacts

These three artifacts are due on or before Nov 5th in a team meeting

1) AnalysisDocument

3) Class Diagram

2) Sequence Diagram

User Stories Implemented

Complete the user stories determined during the Thursday team meetings.Minus 10 points for any user story that is not implemented to a max of -50 points.

  • Simple GUI showing map, tanks
  • Dynamically load maps
  • 1 map is sufficient, but needs to show that it's dynamically loaded/rendered and not entirely hardcoded
  • >= 2 types of obstacles
  • Simple AI
  • Move tanks
  • Destroy tanks

Note:No animation or networking required for iteration 1

Iteration 2:

This iteration is your final release. It should implement everything that is required in the specification, and be bug-free. The additional features should be included in Iteration 2.

+100 Project Specific Requirements
+25 Robustness, Appearance, Usability

+50 Additional Features

Additional Features

Implement at least 50 points worth of features from the list below. This is by no means an exhaustive list of features, but merely a list of suggestions for potential features. Some of these are much harder to implement than others, and are worth more accordingly. Talk to your grader if you have other ideas to ensure that you receive points for your feature.

Include a file named chosenFeatures in your eclipse project that lists each chosen feature from the list below or is a chosen feature

Choose 50 points worth of additional features

  • User can pause the game. +5 points
  • Players can select different types of tanks/weapons +3 points
  • Tanks can lay one mine at a time, which explodes a few seconds later +5 points
  • Different types of enemy AI's can be used +10 points
  • Missiles bounce once off of obstacles or walls +10 points
  • Game is unusually crisp, and animation is dazzling. +10 points
  • Splash screen appears at the beginning of the game +2 points
  • Sound effects for movement, firing missiles, destroying tanks, etc. are included +10 points
  • Level editor +10 points
  • There are five or more unique types of obstacles +5 points
  • There are twenty or more unique maps +5 points
  • You can play a “campaign mode” that goes through several or all of your maps and allows you a small number of lives to beat all maps +15 points
  • Can play single-player against multiple AI's +10 points
  • Can play two-player with AI's (can be co-op or free-for-all) +20 points
  • Other extra features that you think of will be assigned points based upon their difficulty.