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
sudo apt-get install libglew-dev libfreetype6-dev
Install GLM, GLFW, and LDTKLoader.
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
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;
}
A non-exhaustive list of features:
- Sprite.
- Geometric Shape (Rectangle, Circle, Convex, Triangle...).
- Basic CollisionBox.
- Light and NormalMap for light reflexion.
- Camera.
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.shscript in the root of the repository. - Or directly
clang-formatcommand with.clang-formatfile in te root of the repository.
Following the style helps keep the code clean and consistent for everyone.