Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/princelad/tetris
This is a Java-based clone of the classic arcade game Tetris, developed using Java Swing for the graphical user interface. The game follows the traditional Tetris mechanics, where blocks fall, and the player rotates and moves them to create complete lines.
https://github.com/princelad/tetris
java swing swing-gui tetris-clone
Last synced: 6 days ago
JSON representation
This is a Java-based clone of the classic arcade game Tetris, developed using Java Swing for the graphical user interface. The game follows the traditional Tetris mechanics, where blocks fall, and the player rotates and moves them to create complete lines.
- Host: GitHub
- URL: https://github.com/princelad/tetris
- Owner: Princelad
- License: mit
- Created: 2024-06-08T07:30:51.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-13T05:52:33.000Z (3 months ago)
- Last Synced: 2024-08-13T10:48:09.058Z (3 months ago)
- Topics: java, swing, swing-gui, tetris-clone
- Language: Java
- Homepage:
- Size: 33.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tetris
This project is a Java-based clone of the classic arcade game Tetris, developed with Java Swing for the graphical user interface. It faithfully replicates the traditional Tetris gameplay, where players rotate and maneuver falling blocks to complete lines and score points.
![Tetris Game Screenshot](screenshots/gameplay.png)
![Game Over](screenshots/game-over.png)## Features
- **Classic Gameplay:** Enjoy the timeless Tetris experience with authentic falling tetrominoes.
- **Scoring and Levels:** Track your progress as you advance through increasingly challenging levels.
- **Simple GUI:** Built with Java Swing for a clean, responsive interface.
- **Pause/Resume Functionality:** Easily pause and resume your game at any time.## Installation
1. **Clone the Repository:**
```bash
git clone https://github.com/Princelad/Tetris.git
cd Tetris
```2. **Build the Project:**
Open the project in your preferred Java IDE and build it using the provided source files.3. **Run the Game:**
Execute the main class (`Main.java`) to start playing.## Controls
- **Move Left:** `Left Arrow`
- **Move Right:** `Right Arrow`
- **Rotate:** `Up Arrow`
- **Soft Drop:** `Down Arrow`
- **Pause/Resume:** `Esc` Key## How It Works
The game operates on a simple state machine that manages gameplay elements like block generation, movement, collision detection, and line clearing. The Java Swing library handles the rendering of the game window and user input. The main loop updates the game state based on player actions and automatically drops tetrominoes over time.
## Contributing
Contributions are welcome! To contribute:
1. Fork the repository.
2. Create a new branch.
3. Implement your feature or bug fix.
4. Submit a pull request with a clear description of your changes.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
## Author
- **Prince Lad** - [Princelad](https://github.com/Princelad)
Prince is a software developer with a passion for creating engaging and educational software projects. This Tetris clone was developed as a personal project to explore and understand game development principles in Java.## Acknowledgments
- **Alexey Pajitnov:** Creator of the original Tetris game.
- **Java Swing Community:** For their contributions to the graphical interface.
- **Video Tutorial:** Special thanks to the [YouTube tutorial](https://www.youtube.com/watch?v=N1ktYfszqnM&t=2365s) that inspired and guided the development of this project.