Skip to content

Alexander7474/Bbop-2D

Repository files navigation

Bbop-2D

GitHub License GitHub Release GitHub last commit

Bbop-2D is a graphics library based on OpenGL, specifically designed for 2D game development.
It stands out with its support for lighting and normal maps, enabling the creation of visually rich and immersive environments, even in a 2D context.

Installation
Features
Documentation
Tutorials
Report Issue
Contribute

Installation

External Libraries

sudo apt-get install libglew-dev libfreetype6-dev 

Install GLM, GLFW, and LDTKLoader.

Install Bbop

Bbop-2D require at least a C++17 compiler. Older complier will not work due to GLM.

git clone https://github.com/Alexander7474/Bbop-Library.git
cd Bbop-Library
make && sudo make install

Simple loop example

This is a basic loop with the mandatory functions you need to use the library.

int main()
{
    GLFWwindow * window;
    bbopInit(1920,1080,"window name",window);
    while (!glfwWindowShouldClose(window))
    {
      bbopCleanWindow(window,Vector3i(0,0,0),1.0f));
    
      ///////////////
      // your code
      ///////////////
    
      bbopErrorCheck();
      glfwSwapBuffer(window);
      glfwPollEvents();
    }
    glfwDestroyWindow(window);
    glfwTerminate();

    return 0;
}

Features

A non-exhaustive list of features:

  • Sprite.
  • Geometric Shape (Rectangle, Circle, Convex, Triangle...).
  • Basic CollisionBox.
  • Light and NormalMap for light reflexion.
  • Camera.

Contributing

We welcome contributions! If you want to help improve Bbop-2D, feel free to submit a pull request.

Please make sure to follow the project’s coding style. You can easily format your code using:

  • The format_code.sh script in the root of the repository.
  • Or directly clang-format command with .clang-format file in te root of the repository.

Following the style helps keep the code clean and consistent for everyone.

Sponsor this project

Packages

 
 
 

Contributors