Engine² (or Engine Squared)
[
](LICENSE)

Engine² is a game engine that aims to provide a developer-friendly and open-source alternative for 3D game development. It is designed to provide truly open-source project and be accessible to everyone.
Examples
Prerequisites
Make sure the following tools are installed before proceeding:
- Warning
- No other tools should be needed. If you get stuck at some step, please report it by opening a bug issue 🙏 (before doing that, check the documentation about how to create an issue)
Clone the repository
git clone https://github.com/EngineSquared/EngineSquared.git
cd EngineSquared
Configure and build
# Configure (downloads dependencies automatically)
xmake f -y
# Build the engine
xmake build -y
- Note
- Windows only xmake will automatically pull the MSVC toolchain, so you don't need to have it already installed on your machine.
Run a minimal example
Build and run the basic_core_usage example to confirm everything works:
xmake f --basic_core_usage=y -y
xmake run BasicCoreUsage
If the basic core usage run without errors, you're all set. ✅
Project Overview
Here is a graphical overview of the project:
graph TD
ROOT["EngineSquared"]
ROOT --> SRC["src/"<br/><small>All source files of the project</small>]
ROOT --> EX["examples/<br/><small>Runnable demos</small>"]
ROOT --> TOOLS["tools/<br/><small>Some useful general tools</small>"]
ROOT --> DOCS["docs/<br/><small>Images, doxygen</small>"]
SRC --> ENGINE["engine/<br/><small>ECS Core of the engine</small>"]
SRC --> PLUGIN["plugin/<br/><small>Groups of context</small>"]
SRC --> UTILS["utils/<br/><small>Shared utility stuff</small>"]
PLUGIN --> PLUGIN_SRC["src/<br/><small>Source files</small>"]
PLUGIN --> PLUGIN_XMAKE["tests/<br/><small>Tests files</small>"]
Engine² is
STRONGLY built around an
ECS architectural design pattern. The engine core (
src/engine/) provides all necessary stuff to agglomerate logic and data to create any kind project. The Core class is the entry point of the framework, it allows to manipulate entities and systems through schedulers. All features (graphics, physics, sound, etc.) are implemented as
plugins that you register into the engine core.
Available plugins
Here is a list of available plugins:
| Plugin | Description |
| graphic | 3D rendering via WebGPU |
| physics | Rigid body physics via JoltPhysics |
| input | Keyboard/mouse input via GLFW |
| sound | Audio playback via miniaudio |
| window | Window management via GLFW |
| scene | Scene graph management |
| event | Publish/subscribe event system |
| relationship | Parent/child entity relationships |
| native-scripting | Attach C++ scripts to entities |
| rmlui | UI rendering via RmlUi |
| camera-movement | Built-in camera controller |
| rendering-pipeline | Rendering pipeline abstraction |
| default-pipeline | Pre-assembled default render pipeline |
- Warning
- Those schedulers may not be up to date as they are not updated automatically.
How a minimal program looks
Here is a very basic example that can be useful to understand the pattern before contributing:
[](
auto &name) {
Log::Info(name.value +
" arrived."); });
}
}
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
void RunSystems()
Run all the systems once by calling each scheduler.
Definition Core.cpp:83
decltype(auto) RegisterSystem(Systems... systems)
Add one or multiple systems associated with a specific scheduler.
Definition Core.inl:61
Entity CreateEntity()
Create an entity in the context of the registry.
Definition Core.cpp:44
Registry & GetRegistry()
Get the entt::registry that contains all components. It should be used to update component through sy...
Definition Core.hpp:50
Startup scheduler that runs systems only once.
Definition Startup.hpp:8
void HelloSystem(Engine::Core &core)
Definition main.cpp:35
int main(void)
Definition main.cpp:80
void Info(const T &msg) noexcept
Definition Logger.hpp:47
std::string value
Definition main.cpp:17
- Warning
- This example may not be up to date as it's not updated automatically. For concrete working examples, you can check examples folder.
Where to go next
Interested ?
Troubleshooting
For now there is no troubleshooting found. If you encounter a problem, please report it by opening a
question issue 🙏
(before doing that, check the documentation about how to create an issue)