Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Breakout Arcade

A complete, fully playable Breakout arcade game built with C++17 and Raylib 4.x.

Prerequisites

If you use CMake to build the project, it will automatically download and compile Raylib locally using FetchContent. However, if you choose to build manually using g++, you will need to install Raylib first.

How to Build with CMake (Recommended)

Run the following commands in sequence in your terminal from the project root directory (breakout-arcade/):

  1. Configure the Project

    cmake -B build
  2. Build the Game

    cmake --build build

    (This will take a moment on the first run as it downloads and compiles raylib itself).

  3. Run the Executable

    # On Windows
    ./build/Debug/BreakoutArcade.exe  # Or ./build/BreakoutArcade.exe depending on the generator
    
    # On Linux/macOS
    ./build/BreakoutArcade

How to Build Manually with g++ (Fallback)

If you prefer to skip CMake and have already installed raylib on your system, you can compile with a single g++ command. The executable will be output to the build/ directory.

Windows (MinGW)

Ensure you have MinGW installed and raylib is accessible. From the project root:

mkdir -p build && g++ src/*.cpp -o build/BreakoutArcade.exe -Iinclude -O2 -Wall -std=c++17 -lraylib -lopengl32 -lgdi32 -lwinmm

Linux

mkdir -p build && g++ src/*.cpp -o build/BreakoutArcade -Iinclude -O2 -Wall -std=c++17 -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

macOS

mkdir -p build && g++ src/*.cpp -o build/BreakoutArcade -Iinclude -O2 -Wall -std=c++17 -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL -lraylib

How to Run

After building, you can run the executable from the compiled location:

  • Windows: build\BreakoutArcade.exe
  • Linux/macOS: ./build/BreakoutArcade

Controls

  • A / LEFT ARROW: Move Paddle Left
  • D / RIGHT ARROW: Move Paddle Right
  • SPACE: Launch Ball (from Paddle), Start Game
  • P: Pause Game
  • R: Restart after GAME OVER or WIN

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages