• Tank Royale is a 2D topdown tank battle multiplayer game designed to be played on a single keyboard and computer.
• The objective of the game is to eliminate all of the other tanks in order to be the last tank standing.
• The latest version has accurate collision detection, bullet richochet, various maps, round configuration, and a "sicko" mode.
• Implemented using Java and the JavaFX library.
You can test the game out right away by having a Java Runtime Environment installed and then running Release.jar
To compile Tank Royale you must have a recent version of:
• Java development kit(JDK) installed on your computer. If not, follow this link: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
• JavaFX installed on your computer. If not, follow this link:
https://docs.oracle.com/javafx/2/installation/jfxpub-installation.htm
• JUnit installed on your computer. If not, follow this link:
https://www.tutorialspoint.com/junit/
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
1. Download the TankRoyale Master zip file: https://github.com/AnjolaAA/TankRoyale.git
2. Locate TankRoyale-Master.zip folder inside your directory (By default, it should be in the downloads folder)
3. Unzip file to a directory of your choice by right-clicking TankRoyale-Master.zip and choosing extract all.
1. Open the terminal (command prompt)
2. Type: "cd [filepath to unzipped location]\TankRoyale-master\TankRoyale-master\Demo 3\src" in the command
prompt to change directory. Example is below.
3. To compile, type in the command prompt: javac drivers/*.java
1. To run the GUI version of the game, type in the command prompt: Java drivers.MainGUI
Make sure to have compiled the game first.
2. To run the TextBased version of the game, type in the command prompt: Java drivers.MainTB
Make sure to have compiled the game first.
1.To test the code, Type: "cd [filepath to unzipped location]\TankRoyale-master\TankRoyale
master\Demo 3\src" in the command prompt to change directory as shown above in the Compile section.
2.To compile the code for testing using the following command: javac -cp .;junit
4.12.jar;hamcrest-core-1.3.jar drivers/*.java handlers/*.java logic/*.java visuals/*.java
3.To run the Junit tests, type: “java -cp .;junit-4.12.jar;hamcrest-core-1.3.jar org.junit.runner.JUnitCore logic.[Test document name]” To run all tests at once input TestSuite as the Test document name. Example is shown below.
The controls for this program are done through user input into the console using a set command list. After each input is given the game's map will redraw itself to match the users input. The console will then prompt the user for another input. This repeats until the game ends.
Player One
Control/Command | Action |
---|---|
Up arrow | Moves tank forwards |
Down arrow | Moves tank backwards |
Right arrow | Rotate tank clockwise |
Left arrow | Rotate tank counter clockwise |
Enter Key | Shoot bullet |
Player Two
Control/Command | Action |
---|---|
'W' | Moves tank forwards |
'S' | Moves tank backwards |
'D' | Rotate tank clockwise |
'A' | Rotate tank counter clockwise |
'Q' | Shoot bullet |
- Previous Version 2.0: GUI Beta
-Previous Version 1.5: GUI Beta
• Tanks were visualized as randomly colored Rectangles
• Known Bugs (mostly fixed): Passing through walls, random self-implosion, and errors with ricochet
-Previous Version 1.0: Text-based format
• Text-based and Turn-based
• Movement and shooting occurred in all four cardinal directions.
• Commands were implemented by user input into the console using a set command list.
After each input the game's map redrew itself to match the users input and prompt the
user for another input. This repeated until the game ended.
Harry Chen, Anjola Adeboye, Mei Hou, Joshua Kim, Andre Staffa
The game was Inspired by the browser game "Tank Trouble", which can be found at: https://tanktrouble.com/