This is my implementation of the game ZType using entirely Java. This was a pair-programming assignment for my class CS2510.
In this project, my partner and I made the game from scratch using lists and Java funworld library.
- Words will appear on the screen. Type the words to destroy the enemy ships.
- Each correct letter you type will fire a shot at the ship.
- If a ship reaches you, the game is over.
Type fast and good luck! 🚀
P.S. you can change how fast the words are appearing in the game by following this.
Since this project was developed using a library made by my university, they must be installed and set up correctly for the game to work. Please run the project in Eclipse since the project was written in Eclipse. (IntelliJ IDEA for Java always but we gotta respect the OG and setting up the run config and library dependencies in other IDE is a nightmare...)
If you do not have Eclipse and don't want to download the IDE, here is a demo of the project:
Screen.Recording.2024-02-22.at.10.36.42.PM.mov
Java Development Kit (JDK): Make sure JDK 11 is installed. If not, you can download it here.
External Library: This project is built on a custom library provided by CS2510 Fundies 2 team. You need to import the required JAR files to run the project. The library can be found in the lib folder.
- Clone this repository or download the ZIP file and extract it.
- Open Eclipse and create a new project.
- Browse to the directory where you cloned or extracted the project and import it.
- Adding the external JARS:
- Right-click on the project and select Properties.
- Click on Java Build Path > Libraries and click Add External JARS
- Browse to the lib folder and select both of the JAR files to add it.
- Click Apply and Close
- Move the ZType.java file to the src file of the project you created.
- Running the file:
- Click the arrow down symbol next to the first green play button in the bar near the top of the screen/
- Click Run Configurations > Java Application in the sidebar.
- Select tester.Main as the Main class.
- In the Arguments tab, for Program arguments, type ExamplesZType
- Click Apply then Run.
- Next time you want to run the project again, click the arrow down button next to the first green play button and choose the config you set up.
To change the speed of words falling down the screen, navigate to the class ExamplesZType and scroll to the last method testBigBang, which should be the last method in the file.
In this line,
double tickRate = 0.15;
The number 0.15 represents the speed of words falling in the game. Currently, it is set to 0.15. Lower values make the words fall faster, and higher values slow them down.