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
The game consists of several classes:
- GameFrame: Initializes the game window and sets up the game board.
- Board: Represents the game board where all game elements are drawn and updated.
- Player: Defines the player character and its behavior.
- Enemy: Represents the enemies in the game and their behavior.
- Sprite: Abstract class for common properties and behaviors shared between player and enemies.
-
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.
-
Objective:
- Navigate the player character through the enemies to reach the end of the game board.
- Avoid collisions with enemies to prevent game over.
To run the game locally, follow these steps:
- Clone this repository to your local machine.
- Ensure you have Java Development Kit (JDK) installed.
- Open the project in your preferred Java IDE.
- Run the
GameFrame.java
file.
This project is licensed under the MIT License - see the LICENSE file for details.