This project consists on practicing good OOP in Java by implementing the Tank Wars Game. It was made using IntelliJ IDE using Java version 8 update 221. The game fullfils the following requirements:
- Tank Game must have 2 Players
- Tank Game must have tanks that move forwards and backwards
- Tank Game Must have tanks that rotate so they can move in all directions a. Note when only rotating left or right, the tank MUST NOT move forwards or backwards.
- Tank Game must have a split screen.
- Tank Game must have a mini-map
- Tank Game must have health bars for each tank
- Tank Game must have lives count (how many lives left before game over) for each tank
- Tank Game must have power up (these are items that can be picked up to modify your tank. What these power ups are, is up to you).
- Tank game must have unbreakable walls
- Tank game must have breakable walls
- Tank Game must have tanks that can shoot bullets that collide with walls
- Tank Game must have tanks that can shoot bullets that collide with other tanks.
-
Clone or download the project to create a copy on your local machine. If you need help on cloning the repository using the command line follow this link: https://services.github.com/on-demand/github-cli/clone-repo-cli.
-
To play the game, run the tankGame.jar file located in the JAR folder.
-
You can also run the game in your preferred IDE. To do so, import the project and select the csc413-tankgame-lseljak92 folder as the root.
-
Select the GameWorld class and Run the project.
- Commands for player 1 are:
[Arrow UP] - Tank 1 moves upwards
[Arrow DOWN] - Tank 1 moves downwards
[Arrow LEFT] - Tank 1 rotates left
[Arrow RIGHT] - Tank 1 rotates right
[Key ENTER] - Tank 1 shoots
- Commands for player 2 are:
[Key 'W'] - Tank 2 moves upwards
[Key 'S'] - Tank 2 moves downwards
[Key 'A'] - Tank 2 rotates left
[Key 'D'] - Tank 2 rotates right
[Key SPACE] - Tank 2 shoots
-
The game is over when one of the players looses all their lives.
-
There are power ups in different locations of the GameMap.
Extra Life: Adds one life to the tank who collects the heart.
Speed Boost: Increases the speed of the tank who collects the bolt.