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 (see Differences with 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.
First 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() {
sprite.setPosition({ 300, 200 });
text.setPosition({ 100, 100 });
while (window.isOpen()) {
while (window.pollEvent(event)) {
window.close();
break;
default:
break;
}
}
renderer.clear();
renderer.draw(sprite);
renderer.draw(text);
renderer.display();
}
return 0;
}
A character font.
Definition: Font.h:109
A window that can serve as a target for 2D drawing.
Definition: RenderWindow.h:80
A drawable representation of a texture, with its own transformations, color, etc.
Definition: Sprite.h:75
Graphical text that can be drawn to a render target.
Definition: Text.h:80
A texture for colored images.
Definition: Texture.h:313
An OS window.
Definition: Window.h:97
@ Closed
The window requested to be closed (data in event.window)
static constexpr Color4< T > White
White predefined color.
Definition: Color.h:168
Defines a system event and its parameters.
Definition: Event.h:224
EventType type
Type of the event.
Definition: Event.h:225
Documentation
- Introduction to gf
- Tutorials on gf
- User documentation (WIP)
- Core classes
- Window classes
- Graphics classes
- Game classes
Source
The source code is available on github.