Gf
A C++17 framework for 2D games
Install / Use
/learn @GamedevFramework/GfREADME
Gamedev Framework (gf)
Gamedev Framework (gf) is a framework to build 2D games in C++17. It is based on SDL and OpenGL ES 2.0, and presents an API that is very similar to the graphics module of SFML with additional features. It is not a game engine, it is more something like a framework, similar to libGDX in the Java world.
Gamedev Framework (gf) is licensed under the terms and conditions of the zlib/libpng license.

Quick example
#include <gf/Event.h>
#include <gf/Font.h>
#include <gf/RenderWindow.h>
#include <gf/Sprite.h>
#include <gf/Text.h>
#include <gf/Window.h>
int main() {
// Create the main window and the renderer
gf::Window window("Example", { 640, 480 });
gf::RenderWindow renderer(window);
// Load a sprite to display
gf::Texture texture("sprite.png");
gf::Sprite sprite(texture);
sprite.setPosition({ 300, 200 });
// Create a graphical text to display
gf::Font font("DroidSans.ttf");
gf::Text text("Hello gf!", font, 50);
text.setPosition({ 100, 100 });
renderer.clear(gf::Color::White);
// Start the game loop
while (window.isOpen()) {
// Process events
gf::Event event;
while (window.pollEvent(event)) {
switch (event.type) {
case gf::EventType::Closed:
window.close();
break;
default:
break;
}
}
// Draw the entities
renderer.clear();
renderer.draw(sprite);
renderer.draw(text);
renderer.display();
}
return 0;
}
Documentation
See the online documentation for Gamedev Framework (gf).
Packaging
Contact
If you want to talk directly with the developpers, you can
- chat on the Discord server of gf
- post a message on /r/GamedevFramework.
Contribution
Gamedev Framework (gf) is very open to contributions. See the contribution guidelines.
Dependencies
You have to install the following dependencies:
- SDL2 >= 2.0.8 (zlib/libpng license)
- Boost String Algorithms >= 1.65 (Boost license)
- Boost Heap >= 1.65 (Boost license)
- Freetype >= 2.9.1 (FreeType license)
- zlib >= 1.2.11 (zlib/libpng license)
- pugixml >= 1.8.1 (MIT licence)
- CMake >= 3.10.2
See the documentation for more information on how to build and install gf.
Screenshots
These screenshots are from games included in the repository.
Games

Code Quality
Related Skills
node-connect
328.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
81.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
328.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
81.0kCommit, push, and open a PR
