This project is a Breakout (Brick Breaker) game implemented in C, using a graphical library (libTableauNoir).
The player controls a paddle to bounce a ball and destroy bricks while keeping the ball from falling off the screen.
- Paddle controlled by mouse or keyboard
- Ball physics with realistic rebounds
- Brick collision detection
- Score system with graphical digits
- Life system (hearts)
- Sound effects and background music
- Menus (start menu, mode selection, color selection)
- Win and loss screens
- The ball bounces off walls, paddle, and bricks
- Each destroyed brick increases the score
- The player loses a life if the ball falls below the paddle
- The game ends when:
- All bricks are destroyed (win)
- All lives are lost (game over)
modele_t: Game model (ball, paddle, bricks, states)donnees_t: Game state and rendering toolsinit_modele(): Initializes positions and velocitiesmettre_a_jour(): Updates game physics and collisionsafficher()/effacer(): Rendering logiclignebrique(): Brick layout generationmenu1(),menu2(): Game menusgagner(): Win conditionafficher_score(): Displays the score using images
- Mouse mode: Paddle follows mouse movement
- Keyboard mode:
- Left Arrow โ Move left
- Right Arrow โ Move right
SPACEโ Start / Continue- Close window โ Exit game
Make sure the required graphics and audio library is installed.
gcc casse_briques.c -o casse_briques -lTableauNoir -lm
./casse_briques