

This is a game engine project that is currently under heavy development and is mainly for educational purposes.
It is written in C++20
and tries to use modern C++ features and best practices wherever possible.
📑 Table of Contents
- 🚀 Features
- 🛠️ Getting Started
- 📋 Prerequisites
- 📥 Cloning the repository
- 📦 Installing dependencies
- 🔨 Building
- 🚀 Running
- 📝 Examples
- 🌱 Create a new application
- 🎨 Create a new renderer
- 🎬 Define render passes and subrenderers
- 📷 Screenshots
- 🤝 Contributing and bug reports
- 🔒 License
- 📧 Contact
🚀 Features
Here are the features that are ready or under development:
- [x] Entity-Component-System architecture
- [x] 3D rendering
- [x] Scripting support
- [x] Audio engine
- [x] Scene management
- [ ] Lighting system 🔜
- [ ] Post-processing effects 🔜
- [ ] 2D / UI rendering 🔜
- [ ] Physics engine 🔜
- [ ] Networking support 🔜
- [ ] AI system 🔜
🛠️ Getting Started
📋 Prerequisites
To build the project, you need the following tools:
To get started with the project, follow these steps:
Note: The project is configured so that all commands are run from the root directory of the project
📥 Cloning the repository
To clone the repository, run the following command:
git clone https://github.com/KabelitzJ/sandbox.git
📦 Installing dependencies
The dependencies for this project are managed using Conan
. To install the dependencies, run the following command:
conan install . --profile=default --build=missing
🔨 Building
The project uses CMake
as the build tool. To build the project, run the following commands:
cmake . -B "build/debug/" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug
Adjust the generator and build type according to your needs.
After that, run the following command to build the project:
cmake --build "build/debug/"
🚀 Running
To run the demo executable, run the following command:
./build/debug/bin/demo.exe
📝 Examples
The project comes with a demo executable that showcases the features of the engine. To run the demo, follow the steps in the Running section.
🌱 Create a new application
The demo creates a new class that derives from the sbx::core::application
class. The application class is used to configure the game and to create the scene. It then is passed to the engine via the auto sbx::core::create_application() -> std::unique_ptr<sbx::core::application>
function.
#include <libsbx/assets/assets.hpp>
#include <libsbx/devices/devices.hpp>
public:
demo_application() {
auto& devices_module = sbx::core::engine::get_module<sbx::devices::devices_module>();
auto& window = devices_module.window();
sbx::core::engine::quit();
};
auto& assets_module = sbx::core::engine::get_module<sbx::assets::assets_module>();
assets_module.set_asset_directory("./demo/assets");
auto prototype_black_id = assets_module.load_asset<
sbx::graphics::image2d>(
"res://textures/prototype_black.png");
}
~demo_application() override {
}
auto update() -> void {
if (sbx::devices::input::is_key_pressed(sbx::devices::key::escape)) {
sbx::core::engine::quit();
}
}
};
auto sbx::core::create_application() -> std::unique_ptr<sbx::core::application> {
return std::make_unique<demo_application>();
}
Definition: application.hpp:6
Definition: image2d.hpp:15
An event that is fired when a window requests to be closed.
Definition: events.hpp:17
🎨 Create a new renderer
To render anything to the screen, you need to create a class that derives from the sbx::graphics::renderer
class. The renderer class is used to render everything from scenes over UI elements to post-processing effects. It is passed to the engine via the auto sbx::graphics::create_renderer() -> std::unique_ptr<sbx::graphics::renderer>
function.
#include <libsbx/graphics/graphics.hpp>
public:
demo_renderer() {
}
~demo_renderer() override {
}
auto initialize() -> void override {
};
};
public:
demo_application() {
auto& graphics_module = sbx::core::engine::get_module<sbx::graphics::graphics_module>();
graphics_module.set_renderer<demo_renderer>();
}
};
Definition: renderer.hpp:25
🎬 Define render passes and subrenderers
To render anything to the screen, you need to define a render pass and a subrenderer. The render pass is used to define the order in which the subrenderers are executed. The subrenderer is used to render things like meshes or UI elements.
#include <libsbx/graphics/graphics.hpp>
#include <libsbx/models/models.hpp>
#include <libsbx/ui/ui.hpp>
public:
demo_renderer() {
auto attachments = std::vector<sbx::graphics::attachment>{
};
auto subpass_bindings = std::vector<sbx::graphics::subpass_binding>{
};
add_render_stage(std::move(attachments), std::move(subpass_bindings));
}
~demo_renderer() override = default;
auto initialize() -> void override {
}
};
Definition: render_stage.hpp:38
Definition: render_stage.hpp:92
Definition: pipeline.hpp:22
📷 Screenshots

🤝 Contributing and bug reports
Contributions to the project are welcome. To contribute, follow these steps:
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
If you find any bugs or have any suggestions, feel free to open an issue.
🔒 License
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to use this project for your own purposes. If you do you may send me a message, I would love to see what you have created with this project.
📧 Contact
GitHub: KabelitzJ