Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A C++17 framework for 2D games

License

NotificationsYou must be signed in to change notification settings

GamedevFramework/gf

Repository files navigation

AppVeyorUbuntuBuildWindowsBuildGitHub licenseGitHub tag

Gamedev Framework (gf) is a framework to build 2D games in C++17. It is based onSDL andOpenGL ES 2.0, and presents an API that is very similar to the graphics module ofSFML with additional features. It isnot agame engine, it is more something like a framework, similar tolibGDX in the Java world.

Gamedev Framework (gf) is licensed under the terms and conditions of thezlib/libpng license.

Gamedev Framework (gf)

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>intmain() {// Create the main window and the renderer  gf::Windowwindow("Example", {640,480 });  gf::RenderWindowrenderer(window);// Load a sprite to display  gf::Texturetexture("sprite.png");  gf::Spritesprite(texture);  sprite.setPosition({300,200 });// Create a graphical text to display  gf::Fontfont("DroidSans.ttf");  gf::Texttext("Hello gf!", font,50);  text.setPosition({100,100 });  renderer.clear(gf::Color::White);// Start the game loopwhile (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();  }return0;}

Documentation

See theonline documentation for Gamedev Framework (gf).

Packaging

Packaging status

Contact

If you want to talk directly with the developpers, you can

Contribution

Gamedev Framework (gf) is very open to contributions. Seethe contribution guidelines.

Dependencies

You have to install the following dependencies:

See thedocumentation for more information on how to build and install gf.

Screenshots

These screenshots are from games included in the repository.

Games

gf Pong!gf 2048!

Code Quality

  • LGTM:Language grade: C/C++
  • CodeFactor:CodeFactor
  • Codacy:Codacy Badge

[8]ページ先頭

©2009-2025 Movatter.jp