Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stupid Brick Breaker

A C++ brick breaker/breakout game built with raylib - a simple and easy-to-use library for game development.

About

Stupid Brick Breaker is a classic brick breaker game where you control a paddle to bounce a ball and destroy bricks on the screen. Try to clear all the bricks and achieve the highest score!

Requirements

Before building the game, make sure you have the following installed:

macOS

  • Xcode Command Line Tools - Required for compilation
    xcode-select --install
  • CMake (version 3.10 or higher)
    brew install cmake
  • raylib - Graphics library
    brew install raylib

Linux (Ubuntu/Debian)

sudo apt-get install build-essential cmake libraylib-dev

Windows

Installation & Building

Clone the Repository

git clone <your-repo-url>
cd Stupid-Brick-Breaker

Build with CMake

  1. Create a build directory:

    mkdir build
    cd build
  2. Configure the project:

    cmake ..
  3. Build the executable:

    make

    Or on Windows with Visual Studio:

    cmake --build . --config Release

Running the Game

After building, run the executable:

macOS/Linux:

./Untitled_Game

Windows:

Untitled_Game.exe

Or from the build directory:

./build/Untitled_Game

Project Structure

Stupid-Brick-Breaker/
├── CMakeLists.txt          # CMake build configuration
├── main.cpp                # Main game source code
├── raylib-cpp/             # raylib C++ wrapper library
└── build/                  # Build output directory (created after building)

Game Controls

  • Mouse: Move your paddle across the bottom of the screen
  • Game Menu: Click buttons to start or navigate
  • Pause: Press the pause button during gameplay

Troubleshooting

Build Fails with "raylib.h not found"

Make sure raylib is properly installed:

CMake Can't Find raylib

On macOS, if using Homebrew, raylib is typically installed in /opt/homebrew/opt/raylib/. The CMakeLists.txt is configured to look there by default.

Port Issues or Runtime Errors

If the game crashes with exit code 139, ensure your raylib installation is compatible with your system and properly linked.

Building from Source (Advanced)

If you want to build raylib from source instead of using the package manager:

  1. Clone raylib: git clone https://github.com/raysan5/raylib.git
  2. Follow building instructions at https://github.com/raysan5/raylib/wiki/Build-and-Installation
  3. Update the CMakeLists.txt paths to point to your custom raylib build

Development

The game is written in C++ with the following key components:

  • Game state management (MENU, PLAYING, GAME_OVER, etc.)
  • Ball physics and collision detection
  • Paddle control
  • Score tracking
  • Multiple game states and transitions

License

See the LICENSE file for details.

Contributing

Feel free to fork this repository and submit pull requests with improvements!

Further Help

For issues with raylib, visit: https://www.raylib.com/ For CMake help, visit: https://cmake.org/cmake/help/latest/

About

Brick breaker but obnoxiously stupid.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages