Skip to content

Musab-Farooq/Bomberman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฃ Bomberman Game

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!


๐ŸŽฎ Game Features

  • ๐Ÿงจ 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.

๐Ÿ•น๏ธ Controls

Action Key
Move W, A, S, D
Place Bomb Spacebar
Exit Game Escape
Menu Navigation Mouse
Back to Menu Backspace

๐Ÿง  Gameplay Mechanics

  • 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.

๐Ÿงฑ Game Architecture

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.

โš™๏ธ Requirements

  • โœ”๏ธ C++ Compiler (e.g. g++)
  • โœ”๏ธ SFML Library (Graphics, Audio, System modules)
  • โœ”๏ธ Texture & Audio Assets (included)
  • โœ”๏ธ Font: Arial.ttf
  • โœ”๏ธ highscore.txt (auto-created if missing)

๐Ÿš€ How to Run

  1. Install SFML in your development environment.
  2. Clone the repository:
    git clone https://github.com/Musab-Farooq/Bomberman.git
    cd Bomberman
    

Compile and run:

g++ main.cpp -o bomberman -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
./bomberman

๐Ÿ“ฆ One-Click Run

Want to try without compiling?


About

It a simple GUI game created in C++ in which you have to kill as many enemies as possible for high score

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages