A simple 2D plane game built in Java using the Swing library.
Use your keyboard to control the plane, shoot enemies, and dodge bullets.
The default controls are:
- Move Left:
A - Move Right:
D - Speed Up:
Space - Shoot Normal Bullet:
J - Shoot Big One-shot Bullets:
K - Pause Game:
Escape
Controls can be changed in the Settings menu.
- Java Development Kit (JDK) 8 or later.
-
Compile the source code: Open a terminal or command prompt in the project's root directory and run the following command to compile the Java source files into the
outdirectory:javac -d out -cp src src/game/main/Main.java src/game/component/Controls.java src/game/component/KeyPressed.java src/game/component/PanelMenu.java src/game/component/PanelSettings.java src/game/component/PlaneGame.java src/game/obj/Bullet.java src/game/obj/Collidable.java src/game/obj/Drawable.java src/game/obj/Effect.java src/game/obj/EnemyBullet.java src/game/obj/GameObject.java src/game/obj/HomingRocket.java src/game/obj/HP.java src/game/obj/HpRender.java src/game/obj/ModelBoom.java src/game/obj/NormalRocket.java src/game/obj/Player.java src/game/obj/PowerUp.java src/game/obj/Rocket.java src/game/obj/ShooterRocket.java src/game/obj/Updatable.java src/game/obj/sound/Sound.java
A simpler way to compile all java files is:
javac -d out src/game/**/*.java
-
Run the game: After compiling, run the game with this command:
java -cp out game.main.Main
This project is licensed under the MIT License - see the LICENSE file for details.