Skip to content

ava-game is a simple 2D spaceship game built using core Java. It features a spaceship navigating through obstacles, demonstrating basic Java game development using JFrame, KeyListener, and sprite rendering.

Notifications You must be signed in to change notification settings

vishalvnair124/java-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ java-game โ€“ Spaceship Game in Java

java-game is a simple 2D spaceship game built using core Java. It features a spaceship navigating through obstacles, demonstrating basic Java game development using JFrame, KeyListener, and sprite rendering.


๐ŸŽฎ Features

  • ๐Ÿ›ธ Control a spaceship using keyboard arrows
  • ๐Ÿงฑ Avoid obstacles (with simple collision logic)
  • ๐ŸŽจ Renders graphics using Java AWT/Swing
  • ๐Ÿ“ฆ Lightweight and beginner-friendly Java game

๐Ÿ—‚ Project Files

java-game/
โ”‚
โ”œโ”€โ”€ Game.java          # Main game logic and rendering
โ”œโ”€โ”€ Game.class         # Compiled class file
โ”œโ”€โ”€ Game$1.class       # Inner class for event handling
โ”œโ”€โ”€ spaceship.png      # Spaceship sprite
โ”œโ”€โ”€ obs.png            # Obstacle image
โ””โ”€โ”€ README.md          # Project documentation

๐Ÿš€ How to Run

  1. Clone or download the repository:
git clone https://github.com/vishalvnair124/java-game.git
  1. Compile and run the game using terminal:
cd java-game
javac Game.java
java Game

Make sure spaceship.png and obs.png are in the same folder as Game.java.


๐Ÿ›  Requirements

  • Java JDK (8 or higher)
  • Any text editor or IDE (e.g., VS Code, IntelliJ, NetBeans)
  • OS: Windows/Linux/macOS

๐Ÿ‘จโ€๐Ÿ’ป Author

Vishal V Nair
Java Enthusiast
๐Ÿ“ซ GitHub: @vishalvnair124

About

ava-game is a simple 2D spaceship game built using core Java. It features a spaceship navigating through obstacles, demonstrating basic Java game development using JFrame, KeyListener, and sprite rendering.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages