Skip to content

MUDITJAINN/2D-Java-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java 2D Game

This repository contains a simple 2D game implemented in Java. The game features a player controlled character navigating through enemies to reach the end.

record_2024-04-26_14-46-23.2D.game.mp4

Game Overview

The game consists of several classes:

  1. GameFrame: Initializes the game window and sets up the game board.
  2. Board: Represents the game board where all game elements are drawn and updated.
  3. Player: Defines the player character and its behavior.
  4. Enemy: Represents the enemies in the game and their behavior.
  5. Sprite: Abstract class for common properties and behaviors shared between player and enemies.

How to Play

  1. Controls:

    • Use the right arrow key to move the player character to the right.
    • Use the left arrow key to move the player character to the left.
  2. Objective:

    • Navigate the player character through the enemies to reach the end of the game board.
    • Avoid collisions with enemies to prevent game over.

Installation

To run the game locally, follow these steps:

  1. Clone this repository to your local machine.
  2. Ensure you have Java Development Kit (JDK) installed.
  3. Open the project in your preferred Java IDE.
  4. Run the GameFrame.java file.

Contributors

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages