A modern, pixel-art recreation of the classic Bomberman arcade game, built using C++ and the SFML (Simple and Fast Multimedia Library). Players dive into a grid-based arena, placing bombs strategically to blow up bricks and outsmart enemies โ all while dodging their own explosions. It's a retro blast packed with modern polish!
- ๐งจ Strategic Bombing: Place bombs that explode in a cross-shape after 3 seconds, destroying nearby bricks and enemies.
- ๐พ Enemy AI: Dodge 5 moving enemies that bounce off obstacles and track across the grid.
- ๐งฑ Dynamic Arena: Mix of unbreakable blocks and 30 randomly placed breakable bricks.
- ๐พ High Score System: Earn points for bricks and enemies, and store your top 3 scores in a file!
- ๐ต Immersive Audio: Background music, bomb explosions, and death sounds to keep your adrenaline high.
- ๐บ Screen Transitions: Includes Start Menu, Game Over screen, and High Score display.
| Action | Key |
|---|---|
| Move | W, A, S, D |
| Place Bomb | Spacebar |
| Exit Game | Escape |
| Menu Navigation | Mouse |
| Back to Menu | Backspace |
- Arena: 768x768 pixel grid divided into 64x64 tiles.
- Bomb Logic:
- Explodes after 3 seconds.
- 1-second explosion animation.
- Cross-range up to 2 tiles.
- Scoring:
- +5 points for each brick destroyed.
- +50 points per enemy killed.
- Game Over:
- Triggered by touching enemies or own explosion.
- Plays death sound and transitions to Game Over screen.
| Class | Description |
|---|---|
Player |
Manages movement, collision detection, and bomb placement. |
Enemy |
Handles 5 autonomous enemies with varied patterns. |
Bomb |
Controls timing, placement, and animation of bomb and explosion. |
Brick |
Randomly places 30 breakable bricks on the arena. |
Blocks |
Fixed unbreakable grid obstacles (36 in total). |
Screens |
Start screen, High Score screen, Game Over screen. |
Buttons |
Interactive menu buttons with hover effect. |
Score |
Tracks game score and handles highscore.txt file I/O. |
- โ๏ธ C++ Compiler (e.g. g++)
- โ๏ธ SFML Library (Graphics, Audio, System modules)
- โ๏ธ Texture & Audio Assets (included)
- โ๏ธ Font: Arial.ttf
- โ๏ธ
highscore.txt(auto-created if missing)
- Install SFML in your development environment.
- Clone the repository:
git clone https://github.com/Musab-Farooq/Bomberman.git cd Bomberman
g++ main.cpp -o bomberman -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
./bombermanWant to try without compiling?
- Download the ZIP release
- Extract the folder.
- Run the provided
.exefile inside to launch Bomberman instantly!