This repository contains a simple implementation of the classic Mario game using Java. The game is built using Java's Swing library for graphical user interface components and basic game mechanics. It provides a nostalgic experience of playing the iconic Mario game with basic controls and a few levels to explore.
- Java Development Kit (JDK) installed on your machine. You can download it from the official Oracle website or use an OpenJDK distribution.
- Clone the repository to your local machine using the following command:
git clone https://github.com/tushar-kumar/mario-game-JAVA.git
- Navigate to the project directory:
cd mario-game-JAVA/src/com/game/main/
- Compile the source code:
javac *.java
- Run the game:
java Main
The objective of the game is to guide Mario through various levels, avoiding obstacles and enemies, and reaching the flag at the end of each level. Mario can jump to collect coins and power-ups while navigating the platforms.
- Left Arrow: Move Mario left.
- Right Arrow: Move Mario right.
- Space: Make Mario jump.
This game is inspired by the classic Mario game developed by Nintendo. Special thanks to the developers of Java and Swing for providing the tools to create this project.
Have fun playing the Mario game! If you encounter any issues or have suggestions for improvement, feel free to open an issue or submit a pull request. Enjoy the nostalgia of playing Mario in a Java environment!