Raylib Bubbles
C++11 Raylib bubble shooter game.
Raylib Bubbles

CodeFactor DeepSource DeepSource


An early demo build showing some main mechanics.

Introduction

Raylib Bubbles is a compact puzzle game following the classic bubble shooter game concept. It relies on the Raylib library for rendering and input handling.

The game is written in C++11 and is built with CMake. It is intended to be a well structured example of a game written with Raylib.


Installation

To get started, follow these steps:

  • Clone the repository with git clone https://github.com/magnetrwn/raylib-bubbles.git.
  • Install Raylib, which can be done on Debian by running sudo apt install raylib.
  • Build with ./build.sh, and check the build directory for the built executable, or the zipped bundle dist/bubbles_build[timestamp].zip.
  • Run ./bubbles to start the game.
Note
For instructions on how to play, check the build directory for the INSTRUCTIONS.md file.


Overview

The game is structured in a way that allows for easy modification and extension.

The following libraries are used in the project:

  • Raylib: Graphics and input, linked statically.
  • inipp.h: Configuration file parsing (header-only), Git submodule.
  • doxygen-awesome-css: Doxygen CSS theme, Git submodule.

To summarize the structure of the project, here is a short description of each header file, in alphabetical order:

Include Header Description
src/animation/action.hpp Acts as a list for animations to be applied concurrently and detached to the game state, while keeping track of their action state and referencing the board.
src/animation/lissajous.hpp Provides state object for Lissajous curves.
src/game/board.hpp Provides a way to build an hexagonal grid of bubbles and to manipulate it through a straightforward API.
src/game/game.hpp TODO
src/raylib/window.hpp Manages the window and contains the Raylib game loop. **This is the only header that interacts with Raylib, all others are independent and repurposable.
src/utility/util.hpp Contains static utilities.


Build Details

The static folder contains all files to bundle with the compiled executable. After running ./build.sh, which will run cmake among things, the executable will be placed alongside resources and files to include with it:

  • res/: Contains the fonts and textures used in the game.
  • bubbles: The compiled executable.
  • bubbles.ini: The configuration file for the game.
  • INSTRUCTIONS.md: A file containing instructions on how to play the game.
  • LICENSE: The license file for the game, same as the project license.
Note
There will also be a zipped build generated in the dist project directory, with the name bubbles_build[timestamp].zip. It contains all necessary files to run or distribute the game.
Warning
Build resources such as fonts and textures may fall under a different license, please check the related folders for license information.


Reaching Out

Please make sure to read the contributing docs for relevant information on how to contribute to the project. When contributing, adhere to the code style and Gitflow branching guidelines outlined in the file.

If you wish to discuss contributions or talk about the project in a more detached manner, please use the Discussions tab.