Dog VS Monkey is a shooting game to overcome a dog that spawn and move down to monkey. You are the monkey in this game and you have to shoot every dogs that coming to you as soon as possible cause dogs are so cruel!!!! ≽^•⩊•^≼
- JDK 11 or higher.
- JavaFX SDK (version compatible with your JDK).
- JavaFX SDK: Download the JavaFX SDK from OpenJFX and extract it to a known directory.
- Clone the Repository: Use this command to clone this repository to your local machine.
git clone https://github.com/amphikapha/Dog-VS-Monkey.git
Ensure JavaFX is correctly set up in your development environment:
- IntelliJ IDEA:
- Go to
File
>Project Structure
>Libraries
, add the JavaFX SDK as a library by navigating to itslib
folder. - Modify your run configuration to include VM options for the JavaFX modules you use, e.g.,
--module-path "path/to/javafx-sdk/lib" --add-modules javafx.controls,javafx.fxml,javafx.media
.
- Go to
Compile and run the Main.java
file. Ensure the VM options are set correctly to include the JavaFX library path and modules.
- for jar file: open terminal and cd to the directory of jar file and use this command to run jar file
java -jar --module-path "path/to/javafx-sdk/lib" --add-modules javafx.controls,javafx.fxml,javafx.media Dog-Vs-Monkey.jar
- Use WASD or arrow keys to move your monkey.
- Press SPACE to shoot at dogs.
- Avoid letting dogs reach the bottom of the screen.
- Shoot Small Dog to increase your lives.
- The game ends when all lives are lost or letting Boss Dog down.
Watch the demo video on YouTube to see the game in action