README.md md Copy Edit
Space Invaders is a simple 2D arcade shooter game written in Java using the Swing library. The player controls a spaceship and must defeat waves of alien invaders while avoiding enemy bullets. The game is designed with classic retro aesthetics and engaging gameplay mechanics.
- Player Movement: Use the left and right arrow keys to navigate the spaceship.
- Shooting Mechanic: Press the spacebar to shoot bullets at enemies.
- Enemy Waves: Aliens spawn in waves and move in a sinusoidal pattern.
- Score System: Gain points by destroying enemies.
- Timer Mechanic: Survive until the timer reaches zero to win.
- Game Over Conditions:
- Aliens reaching the bottom of the screen.
- Player getting hit by an alien bullet.
- Download
game.jarfrom the provided link. - Double-click
game.jarto run the game. (Ensure Java is installed on your system) - Alternatively, use
start.batto launch the game.
- Clone or download the repository.
- Open the project in an IDE (such as Eclipse or IntelliJ).
- Ensure Java (JDK 8+) is installed.
- Compile and run
App.javaorMain.java.
- Left Arrow (←): Move spaceship left
- Right Arrow (→): Move spaceship right
- Spacebar: Shoot bullets
- Language: Java (Swing, AWT)
- Libraries Used: Java Swing, Timer (javax.swing.Timer)
- UI Components: JFrame, JPanel
- Game Loop: ActionListener-based game loop
- Add power-ups for the player.
- Introduce different alien types with varied behavior.
- Implement background music and sound effects.
- Create multiple levels with increasing difficulty.