Awesome Open Source
Awesome Open Source


Faur is my personal C framework for my hobby video games.

Features include software 2D graphics, abstractions for inputs and sound, application state management, entity-component-system model, and utilities to help with data, files, math, memory, strings, time, and more.

Faur builds native on Linux and cross-compiles for Web, Windows, and some embedded devices I like, including Arduino-based. The build system uses GNU Make 4.1 and Python 3.6 or later.

Dependencies & Path Setup

# Required
sudo apt install build-essential git python3
sudo apt install libsdl2-dev libsdl2-mixer-dev libpng-dev

# Optional
sudo apt install libsdl1.2-dev libsdl-mixer1.2-dev
sudo apt install ffmpeg python3-pil python3-serial python-is-python3

# Set FAUR_PATH, clone repo, and add tools to path
export FAUR_PATH="$HOME/faur"
git clone git:// $FAUR_PATH
export PATH="$PATH:$FAUR_PATH/bin"

Hello, World

The sample project has two files, main.c and Makefile:

$ faur-new hello

$ tree hello/
├── build/
│   └── make/
│       └── Makefile
└── src/
    └── main.c

$ cd hello/build/make/
$ make run

Move the square with the arrow keys or with a game controller:

Hello, World screenshot


#include <faur.h>

void f_main(void)
    static struct {
        int x, y;
        FButton *up, *down, *left, *right;
    } context;

        context.x = f_screen_sizeGetWidth() / 2;
        context.y = f_screen_sizeGetHeight() / 2;

        context.up = f_button_new();
        f_button_bindKey(context.up, F_KEY_UP);
        f_button_bindButton(context.up, NULL, F_BUTTON_UP);

        context.down = f_button_new();
        f_button_bindKey(context.down, F_KEY_DOWN);
        f_button_bindButton(context.down, NULL, F_BUTTON_DOWN);

        context.left = f_button_new();
        f_button_bindKey(context.left, F_KEY_LEFT);
        f_button_bindButton(context.left, NULL, F_BUTTON_LEFT);

        context.right = f_button_new();
        f_button_bindKey(context.right, F_KEY_RIGHT);
        f_button_bindButton(context.right, NULL, F_BUTTON_RIGHT);

        if(f_button_pressGet(context.up)) {

        if(f_button_pressGet(context.down)) {

        if(f_button_pressGet(context.left)) {

        if(f_button_pressGet(context.right)) {


        f_draw_rectangle(context.x - 40, context.y - 40, 80, 80);




include $(FAUR_PATH)/make/

Cross-Compile for Other Platforms

I started Faur by collecting my GP2X games' shared code into a library. Over time I added support for more platforms:

Platform Toolchain Support Libraries
Linux, FreeBSD OS build tools SDL 2.0, SDL_mixer 2.0, libpng 1.6
Windows MinGW-w64 SDL 2.0, SDL_mixer 2.0, libpng 1.6
Web (Wasm) Emscripten SDL 2.0, SDL_mixer 2.0, libpng 1.6
Embedded Linux
GP2X, GP2X Wiz Open2x SDK SDL 1.2, SDL_mixer 1.2, libpng 1.2
Caanoo GPH SDK SDL 1.2, SDL_mixer 1.2, libpng 1.2
Open Pandora Pandora SDK SDL 1.2, SDL_mixer 1.2, libpng 1.2
Gamebuino META Arduino 1.8.13, Arduino SAMD Boards 1.8.11, Gamebuino META Boards 1.2.2 Gamebuino META 1.3
Odroid-GO Arduino 1.8.13, Arduino ESP32 1.0.6 ODROID-GO 1.0.0

The default toolchain paths are in make/global/, and they can be overridden in a project Makefile or globally in ~/.config/faur/ To build for different targets, change include $(FAUR_PATH)/make/ to use other files from $(FAUR_PATH)/make.


Copyright 2010-2022 Alex Margarit ([email protected])

Faur is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The project is named after the old Romanian word faur, sometimes used in fables to mean wizard blacksmith. ⚒️✨


This is my personal framework and test bed for ideas, and to that end it is a solo project. You are welcome to check it out and use it under the terms of the license, but I do not take pull requests to this repo.

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C (182,165
Game (82,632
Arduino (30,714
2d Graphics (9,116
Game Development (6,468
Gamedev (6,468
Sdl (5,189
Sdl2 (5,189
Ecs (3,256
Arduino Library (2,336
Emscripten (1,432
Zlib (1,377
C99 (501
Mingw (120
2d Game Framework (48
Gamedev Framework (30
Odroid Go (24
Gamebuino Meta (8