https://github.com/guicybercode/blockdestroy
A purple box destruction game implemented in Rust using the ggez library for graphical rendering.
https://github.com/guicybercode/blockdestroy
game-development retro-gaming rust
Last synced: 5 months ago
JSON representation
A purple box destruction game implemented in Rust using the ggez library for graphical rendering.
- Host: GitHub
- URL: https://github.com/guicybercode/blockdestroy
- Owner: guicybercode
- License: mit
- Created: 2025-09-05T15:36:03.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-10-31T14:30:18.000Z (8 months ago)
- Last Synced: 2025-10-31T16:17:38.342Z (8 months ago)
- Topics: game-development, retro-gaming, rust
- Language: Rust
- Homepage:
- Size: 240 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Purple Box Destruction
A purple box destruction game implemented in Rust using the ggez library for graphical rendering.

## Features
- **Box destruction gameplay** featuring classic pieces
- **Modern graphical interface** with vibrant colors and visual effects
- **Progressive scoring system** based on the number of cleared lines
- **Automatic difficulty increase** as the level rises
- **Intuitive controls** with keyboard support
- **Ghost piece** for better placement visualization
- **Pause and restart system**
- **Modular codebase** following Rust best practices
## Controls
- **Left/Right Arrows**: Move piece horizontally
- **Down Arrow**: Move piece downward
- **Up Arrow**: Rotate piece
- **Spacebar**: Hard drop (instant fall)
- **P**: Pause/Unpause game
- **R**: Restart game
- **ESC**: Exit game
## Scoring System
- **1 line**: 100 points × level
- **2 lines**: 300 points × level
- **3 lines**: 500 points × level
- **4 lines (Destruction)**: 800 points × level
- **Hard drop**: 2 points per dropped line
## Levels
The level increases every 10 cleared lines. Drop speed increases with level, making the game more challenging.

## Installation
### Prerequisites
- Rust (version 1.70 or higher)
- Cargo
### Build and Run
1. Clone the repository:
```bash
git clone https://github.com/guicybercode/blockdestroy/tree/main
cd purple-box-destruction
```
2. Build and run the game:
```bash
cargo run --release
```
### Build for Distribution
```bash
cargo build --release
```
build in `target/release/purple-box-destruction`.
## Project structure
```
src/
├── main.rs # Ponto de entrada e loop principal
├── game.rs # Lógica principal do jogo
├── tetromino.rs # Definição das peças e suas rotações
├── board.rs # Gerenciamento do tabuleiro e colisões
├── ui.rs # Interface do usuário e elementos visuais
└── audio.rs # Sistema de áudio (placeholder)
```
## TECHNOLOGIES USED
- **Rust**: Main Language
- **ggez**: 2D Gaming
- **rand**: Random Numbers
- **serde**: Future hihihi
## **한자 (漢字) 포함:**
하나님이 世界를 이처럼 愛하사 獨生子를 주셨으니 이는 그를 信하는 者마다 滅亡하지 않고 永生을 얻게 하려 하심이라