raylib is a free, open source gaming project written in C and released under Zlib. It has 34,783 GitHub stars, 3,299 forks and 16 open issues, and was last pushed 11 hours ago. On this registry it ranks #5 of 12 tracked projects in Gaming, with 5 head-to-head comparisons available.

What is raylib?

raylib is an open-source, Zlib-licensed C programming library for building videogames and graphical applications, aimed at programmers who would rather write code directly than work inside a visual game engine editor.

What it is

raylib is a simple and easy-to-use library to enjoy videogames programming, written in plain C (C99) with PascalCase and camelCase naming. It takes heavy inspiration from the Borland BGI graphics library and from the XNA framework, and it is described as especially well suited to prototyping, tooling, graphical applications, embedded systems and education. It lives in the C and game-development ecosystem, with supported platforms covering Windows, Linux, macOS, Raspberry Pi, Android and HTML5, and with topics that reach further into ESP32, RISC-V, embedded systems, IoT and WebAssembly. The repository carries 34,783 stars, 3,299 forks and 16 open issues, and it is a standalone library rather than a framework with an editor attached.

The concrete problem raylib solves is dependency weight and editor overhead. Where a typical game project must gather a windowing layer, a graphics abstraction, font and texture loaders and additional support code, raylib bundles everything it needs inside its own source tree, so no external dependencies are required. It also rejects the interface layer of mainstream engines: the project note states plainly that there is no fancy interface, no visual helpers and no debug button, just coding in the most pure spartan-programmers way.

Key capabilities

  • No external dependencies: all required libraries are included in raylib under src/external.
  • Multiple platforms supported: Windows, Linux, MacOS, RPI, Android, HTML5 and more.
  • Hardware accelerated with OpenGL 1.1, 2.1, 3.3, 4.3, ES 2.0 and ES 3.0.
  • rlgl, a unique OpenGL abstraction layer usable as a standalone module.
  • rlsw, a software renderer backend that requires no OpenGL at all.
  • Font formats TTF, OTF, FNT, BDF and sprite fonts, plus texture formats including compressed DXT, ETC and ASTC.
  • Full 3D support covering 3D shapes, models, billboards and heightmaps, a flexible materials system with classic maps and PBR maps, and animated 3D models with skeletal bone animation in IQM, M3D and glTF, alongside shader support including model shaders.

Who uses it and how

  • Educators and students, since education is named as a primary fit and the code examples are published openly at the project's examples page.
  • Prototypers and tooling developers who need graphical output quickly without assembling a dependency stack by hand.
  • Embedded and IoT developers, reflected in topics such as esp32, raspberry-pi, riscv, embedded and iot, where the software renderer avoids a hard OpenGL requirement.
  • Web targets, through the HTML5 platform and the WebAssembly build workflow tracked in continuous integration.
  • Programmers who explicitly want no visual helpers, the audience the README addresses as adventurers.

Getting started

raylib is distributed as source with its dependencies bundled in src/external, and the repository maintains CMake build workflows for Windows, Linux, macOS and WebAssembly alongside workflows that build the shipped examples. A packaging status badge tracks distribution-package availability through Repology, and the runnable example programs are collected at the project homepage, http://www.raylib.com.

How it compares

No comparable project and no list of paid products is named anywhere in the facts supplied, so raylib stands alone in this registry rather than being positioned against a named alternative. The only contrast the record supports is internal: unlike engines that ship an editor, raylib ships only a library and expects the programmer to supply everything above it.

When to use it — and when not to

Because raylib is a library and not a service, there is no database, storage layer or mail server to operate; what a user must maintain instead is a build toolchain and a per-platform compile for each target they ship to. Teams that depend on a visual scene editor, asset pipelines with a user interface, or a debug button should not choose raylib, since the project deliberately omits all of those. The documentation supplied here is also thin in places: the features list in the README excerpt is truncated mid-sentence at the shader entry, and the record cites no release history or versioning detail, so anyone evaluating it should read the full README and the code examples before committing.

project readme (upstream, from github) — read inline

raylib is a simple and easy-to-use library to enjoy videogames programming.

raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's especially well suited for prototyping, tooling, graphical applications, embedded systems and education.

NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.

Ready to learn? Jump to code examples!



GitHub Releases Downloads GitHub Stars GitHub commits since tagged version GitHub Sponsors Packaging Status License

Discord Members Reddit Static Badge Youtube Static Badge Twitch Status

Build Windows Build Linux Build macOS Build WebAssembly

Build CMake Build examples Windows Build examples Linux

features

  • NO external dependencies, all required libraries are included in raylib
  • Multiple platforms supported: Windows, Linux, MacOS, RPI, Android, HTML5... and more!
  • Written in plain C code (C99) using PascalCase/camelCase notation
  • Hardware accelerated with OpenGL: 1.1, 2.1, 3.3, 4.3, ES 2.0, ES 3.0
  • Unique OpenGL abstraction layer (usable as standalone module): rlgl
  • Software Renderer backend (no OpenGL required!): rlsw
  • Multiple Fonts formats supported (TTF, OTF, FNT, BDF, sprite fonts)
  • Multiple texture formats supported, including compressed formats (DXT, ETC, ASTC)
  • Full 3D support, including 3D Shapes, Models, Billboards, Heightmaps and more!
  • Flexible Materials system, supporting classic maps and PBR maps
  • Animated 3D models supported (skeletal bones animation) (IQM, M3D, glTF)
  • Shaders support, including model shaders and postprocessing shaders
  • Powerful math module for Vector, Matrix and Quaternion operations: raymath
  • Audio loading and playing with streaming support (WAV, QOA, OGG, MP3, FLAC, XM, MOD)
  • VR stereo rendering support with configurable HMD device parameters
  • Huge examples collection with +140 code examples!
  • Bindings to +70 programming languages!
  • Free and open source

limitations

raylib presents some limitations by design for code simplicity. Some forks, alternatives, and samples are available to overcome most of them but it's up to the users to modify the library for their specific needs.

  • Single window with single OpenGL context by default, no multi-window support
  • Window resize and move stops the rendering loop on platforms supporting a window
  • RenderTextures are flipped vertically, as provided by OpenGL, it's up to the user to draw them flipped to the screen
  • Font rasterization has lower quality than alternatives using Freetype2, HarfBuzz or Slug
  • Text drawing does not support RTL, ligatures or emojis

basic example

This is a basic raylib example, it creates a window and draws the text "Congrats! You created your first window!" in the middle of the screen. Check this example running live on web here.

#include "raylib.h"

int main(void)
{
    InitWindow(800, 450, "raylib example - basic window");

    while (!WindowShouldClose())
    {
        BeginDrawing();
            ClearBackground(RAYWHITE);
            DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
        EndDrawing();
    }

    CloseWindow();

    return 0;
}

build and installation

raylib binary releases for Windows, Linux, macOS, Android and HTML5 are available at the Github Releases page.

raylib is also available via multiple package managers on multiple OS distributions.

Installing and building raylib on multiple platforms

raylib Wiki contains detailed instructions on building and usage on multiple platforms.

Note that the Wiki is open to edits, if you find some issues while building raylib for your target platform, feel free to edit the Wiki or open an issue related to it.

Setup raylib with multiple IDEs

raylib has been developed on Windows platform using Notepad++ and MinGW GCC compiler but it can be used with other IDEs on multiple platforms.

Projects directory contains several ready-to-use project templates to build raylib and code examples with multiple IDEs.

Note that there are lots of IDEs supported, some of the provided templates could require some review, so please, if you find some issue with a template or you think they could be improved, feel free to send a PR or open a related issue.

learning and docs

raylib is designed to be learned using the examples as the main reference. There is no standard API documentation but there is a cheatsheet containing all the functions available in the library with a short description of each one; input parameters and result value names should be intuitive enough to understand how each function works.

Some additional documentation about raylib design can be found in [raylib GitHu

readme truncated — read the full docs on github

Frequently asked questions

Is raylib free to use?

raylib is open source under the Zlib licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does raylib do?

A simple and easy-to-use library to enjoy videogames programming

What is raylib written in?

raylib is primarily written in C. Its source is publicly available at https://github.com/raysan5/raylib, and it has 34,783 GitHub stars.