Genode (Game EngiNe On DEmand) is game framework that written in C++17 and built on top of SFML V3.
As the name suggest, this project is on the contranary side of other common engine or framework; initially, it is not built for general use case in mind. It began with the idea that it would only evolve or change to satisfy the demands of my own game development needs, which favor certain conventions, patterns, and even my own personal preferences.
After successfully developed my game with this framework, I've decided to put this into an open source repository.
Important
The framework is not finalized for public consumption, it may (or may not) need development effort to turn framework into a framework that fits for general use cases. Consider to open an issue and/or raise a pull request if you're interested to contribute.
The framework currently employs an Inheritance over Composition design.
Certain modules such as SceneGraph
are heavily rely on virtual inheritance which may (or may not) introduce performance overhead particularly when dealing with millions of complex node objects.
Alternatively, you can roll out your own ECS solution and use lower-level abstraction classes to partially utilize the SceneGraph
module, thereby still gaining the benefits of Composition over Inheritance.
See Design Goals below for more details.
This design may be changed in the future.
There are myriads of 2D Game Framework out there, and each have its reasons and goals to exist. This framework had these design goals:
The framework provides range of modules and lifecycles that is simple, clear and hopefully intuitive to use. For an instance, you can construct a Scene that requires a lot of dependencies with a non-intrusive IoC container and with minimum to no configuration.
Many frameworks or engines include built-in functionalities for resource serialization, deserialization, and management/allocation. Often, these approaches can be restrictive. For example, these kind of engines usually won't allow you to change the content pipeline or file format, and it is unintuitive to customize and workaround.
This framework streamline on how you interact with resources while still allowing you to choose how they are deserialized, managed, and allocated.
The entire modules are built side by side with SFML. Some of the SFML classes are re-implemented to fit the framework usage, however, you can always use SFML built-in classes. On top of that, there's some classes that allows you to extend SFML capabilities without making intrusive changes into SFML directly.
There are several ranges of abstraction levels in this framework. High abstraction classes are made using one or more lower abstraction classes and it provide convenience but may introduce higher performance overhead.
This framework is designed so that lower-level and higher-level abstractions can work together, often directly alongside SFML, letting you choose the right level of abstraction for your needs.
This framework was initially designed by a single developer in a limited scope, and thus conveniences are priortized over performance and efficiencies. It is still important aspect to certain degree, after all, the game that was built with this framework is a rhythm game that has hundreds moving objects at a time and require smooth framerate and high timing precision.
That being said, there are certainly faster 2D game frameworks/engines out there that are faster and more capable in handling bigger scope in more sophisticated/intuitive/elegant way. However, the goal is to speed up my game development process. If you find yourself in a similar situation, consider give Genode a try.
This framework was directly added into the game source tree and has not been tested to built and included separately.
Use CMake to build the static library and include the headers inside include
directory to your game project.
cmake -B ./build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release
You can find the compilation output in bin
folder.
Please refers to the wiki for the Documentation.
This open-source software is licensed under the zlib/libpng license.
External libraries used by Genode (including SFML and its dependencies) are distributed under their own licenses. See SFML License and External libraries used by SFML for more details.