Skip to content

IbnIssah/java-plane-game-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Plane Game

A simple 2D plane game built in Java using the Swing library.

How to Play

Use your keyboard to control the plane, shoot enemies, and dodge bullets.

Controls

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.

How to Run

Prerequisites

  • Java Development Kit (JDK) 8 or later.

Building and Running

  1. 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 out directory:

    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
  2. Run the game: After compiling, run the game with this command:

    java -cp out game.main.Main

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages