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


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 specially 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 auto-debugging... just coding in the most pure spartan-programmers way.

Ready to learn? Jump to code examples!

GitHub contributors GitHub All Releases GitHub commits since tagged version License

Chat on Discord GitHub stars Twitter Follow Subreddit subscribers

Windows Linux macOS Android WebAssembly CMakeBuilds


  • NO external dependencies, all required libraries are bundled into raylib
  • Multiple platforms supported: Windows, Linux, MacOS, RPI, Android, HTML5... and more!
  • Written in plain C code (C99) in PascalCase/camelCase notation
  • Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0)
  • Unique OpenGL abstraction layer (usable as standalone module): rlgl
  • Multiple Fonts formats supported (TTF, XNA fonts, AngelCode fonts)
  • Outstanding texture formats support, 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)
  • Shaders support, including model and postprocessing shaders.
  • Powerful math module for Vector, Matrix and Quaternion operations: raymath
  • Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
  • VR stereo rendering support with configurable HMD device parameters
  • Huge examples collection with +120 code examples!
  • Bindings to +50 programming languages!
  • Free and open source.

raylib uses on its core module the outstanding GLFW3 library, embedded in the form of rglfw module, to avoid external dependencies.

raylib uses on its raudio module, the amazing miniaudio library to support multiple platforms and multiple audio backends.

raylib uses internally several single-file header-only libraries to support different fileformats loading and saving, all those libraries are embedded with raylib and available in src/external directory. Check raylib Wiki for a detailed list.

On Android platform, native_app_glue module (provided by Android NDK) and native Android libraries are used to manage window/context, inputs and activity life cycle.

On Raspberry Pi 0,1,2,3 platform (native mode), Videocore API and EGL libraries are used for window/context management. Inputs are processed using evdev Linux libraries

On Raspberry Pi 4 platform (native mode), DRM subsystem and GBM API libraries are used for window/context management. Inputs are processed using evdev Linux libraries

On Web platform, raylib uses emscripten provided libraries for several input events management, specially noticeable the touch events support.

build and installation

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

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

Installing and building raylib via vcpkg

You can download and install raylib using the vcpkg dependency manager:

  git clone https://github.com/Microsoft/vcpkg.git
  cd vcpkg
  ./vcpkg integrate install
  vcpkg install raylib

The raylib port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Installing and building raylib via conan

You can download and install raylib using the conan dependency manager:


The raylib recipe in conan is kept up to date by conan team members and community contributors. If the version is out of date, please create an issue or pull request on the conan-center-index repository.

Building raylib on multiple platforms

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

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

Using 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, please, if you find some issue with some template or you think they could be improved, feel free to send a PR or open a related issue.


If you are using raylib and enjoying it, please, join our Discord server and let us know! :)


raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check LICENSE for further details.

  • [core] RPI4 without X11

    [core] RPI4 without X11

    In init device core.c #define RPI4 Initrpi4(); #else Normal init rpi 2 3 bla bla #endif

    ////////////////////// RPI4InitDevice.h // gcc -o drm-gbm drm-gbm-mod.c -ldrm -lgbm -lEGL -lGL -I/usr/include/libdrm

    //---------------------------------------------------------------------- //-------- Trying to get OpenGL ES screen on RPi4 without X //-------- based on drm-gbm https://github.com/eyelash/tutorials/blob/master/drm-gbm.c //-------- and kmscube https://github.com/robclark/kmscube //-------- [email protected] //----------------------------------------------------------------------

    #include <xf86drm.h> #include <xf86drmMode.h> #include <gbm.h> #include <EGL/egl.h> #include <GL/gl.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <stdio.h>

    #define EXIT(msg) { fputs (msg, stderr); exit (EXIT_FAILURE); }

    // global variables declarations

    static int device; static drmModeRes *resources; static drmModeConnector *connector; static uint32_t connector_id; static drmModeEncoder *encoder; static drmModeModeInfo mode_info; static drmModeCrtc *crtc; static struct gbm_device *gbm_device; static EGLDisplay display; static EGLContext context; static struct gbm_surface *gbm_surface; static EGLSurface egl_surface; EGLConfig config; EGLint num_config; EGLint count=0; EGLConfig *configs; int config_index; int i;

    static struct gbm_bo *previous_bo = NULL; static uint32_t previous_fb;


    static const EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };

    struct gbm_bo *bo; uint32_t handle; uint32_t pitch; int32_t fb; uint64_t modifier;

    static drmModeConnector *find_connector (drmModeRes *resources) {

    for (i=0; icount_connectors; i++) { drmModeConnector *connector = drmModeGetConnector (device, resources->connectors[i]); if (connector->connection == DRM_MODE_CONNECTED) {return connector;} drmModeFreeConnector (connector); } return NULL; // if no connector found }

    static drmModeEncoder *find_encoder (drmModeRes *resources, drmModeConnector *connector) {

    if (connector->encoder_id) {return drmModeGetEncoder (device, connector->encoder_id);} return NULL; // if no encoder found }

    static void swap_buffers () {

    eglSwapBuffers (display, egl_surface); bo = gbm_surface_lock_front_buffer (gbm_surface); handle = gbm_bo_get_handle (bo).u32; pitch = gbm_bo_get_stride (bo); drmModeAddFB (device, mode_info.hdisplay, mode_info.vdisplay, 24, 32, pitch, handle, &fb); drmModeSetCrtc (device, crtc->crtc_id, fb, 0, 0, &connector_id, 1, &mode_info); if (previous_bo) { drmModeRmFB (device, previous_fb); gbm_surface_release_buffer (gbm_surface, previous_bo); } previous_bo = bo; previous_fb = fb; }

    static void draw (float progress) {

    glClearColor (1.0f-progress, progress, 0.0, 1.0); glClear (GL_COLOR_BUFFER_BIT); swap_buffers (); }

    static int match_config_to_visual(EGLDisplay egl_display, EGLint visual_id, EGLConfig *configs, int count) {

    EGLint id; for (i = 0; i < count; ++i) { if (!eglGetConfigAttrib(egl_display, configs[i], EGL_NATIVE_VISUAL_ID,&id)) continue; if (id == visual_id) return i; } return -1; }

    Bool initrpi4 () {

    device = open ("/dev/dri/card1", O_RDWR); resources = drmModeGetResources (device); connector = find_connector (resources); connector_id = connector->connector_id; mode_info = connector->modes[0]; encoder = find_encoder (resources, connector); crtc = drmModeGetCrtc (device, encoder->crtc_id); drmModeFreeEncoder (encoder); drmModeFreeConnector (connector); drmModeFreeResources (resources); gbm_device = gbm_create_device (device); gbm_surface = gbm_surface_create (gbm_device, mode_info.hdisplay, mode_info.vdisplay, GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT|GBM_BO_USE_RENDERING); display = eglGetDisplay (gbm_device); eglInitialize (display, NULL ,NULL); eglBindAPI (EGL_OPENGL_API); eglGetConfigs(display, NULL, 0, &count); configs = malloc(count * sizeof *configs); eglChooseConfig (display, attributes, configs, count, &num_config); config_index = match_config_to_visual(display,GBM_FORMAT_XRGB8888,configs,num_config); context = eglCreateContext (display, configs[config_index], EGL_NO_CONTEXT, context_attribs); egl_surface = eglCreateWindowSurface (display, configs[config_index], gbm_surface, NULL); free(configs); eglMakeCurrent (display, egl_surface, egl_surface, context);

    Return here...

    drmModeSetCrtc (device, crtc->crtc_id, crtc->buffer_id, crtc->x, crtc->y, &connector_id, 1, &crtc->mode); drmModeFreeCrtc (crtc); if (previous_bo) { drmModeRmFB (device, previous_fb); gbm_surface_release_buffer (gbm_surface, previous_bo); } eglDestroySurface (display, egl_surface); gbm_surface_destroy (gbm_surface); eglDestroyContext (display, context); eglTerminate (display); gbm_device_destroy (gbm_device);

    close (device); return 0; }

    raspberrypi new feature 
    opened by dginu85 136
  • [build] Make raylib available in package managers

    [build] Make raylib available in package managers

    This would ease deployment quite a bit for users. The package should install a tagged release (e.g. 1.9.4-dev). If a more up-to-date or development snapshot can be requested, it should download the tarball for the newest master branch commit. See https://github.com/Homebrew/homebrew-core/commit/7f7b4bc0a604c8e6a9ccc117bde37245de61ff30 for an example.




    • [X] openSUSE
    • [X] Arch User Repositories (AUR)
    • [x] Linuxbrew
    • [ ] Gentoo
    • [ ] Your Linux distro's package repositories


    • [X] FreeBSD
    • [ ] Your BSD's ports tree?

    If you are able and willing to help, please tell.

    enhancement help wanted 
    opened by a3f 83
  • [core] Mouse movements are bound to the screen resolution

    [core] Mouse movements are bound to the screen resolution

    Issue description

    On the maze example the mouse movements are bound to the screen resolution I have. Also the camera movements are shuttering when I hold move key.


    Raspberry PI 4 no X11, 446f9ff commit. PLATFORM_DRM.

    raspberrypi help wanted 
    opened by GitSparTV 80
  • [build] Android APK building from command line

    [build] Android APK building from command line

    Just studying the possibility to directly build .apk programs from command line... to include with raylib all required tools, curated and packed in a single zip.

    A lot of tools are involved in APK generation and they come in different Android packages, more info here.

    Here it is a list with some of the command line tools provided: https://developer.android.com/studio/command-line/index.html

    Android APK building using ANT


    Android APK building in raw mode (calling all required tools directly)

    1. Code compilation, standalone toolchain could be used
    2. Executable and assets packaging into .apk (unaligned, unsigned), using aapt program
    3. Use dx tool to convert Java bytecode to Dalvik bytecode if required
    4. Sign APK with a key using jarsigner tool, to generate key use keytool (info)
    5. Aligning and optimizing APK, using zipalign tool

    Note that .apk generation tools aapt and dx are included with Android build tools (installed with sdkmanager). Here some info on aapt usage: http://elinux.org/Android_aapt.

    A quite good guide on this process can be found here.

    opened by raysan5 49
  • raylib 2.6 roadmap

    raylib 2.6 roadmap

    raylib has grown a lot in the last years and like in the past, I feel is time to sit down and think carefully about raylib next steps. It's very easy to lose focus and keep adding features to make raylib the next big engine... that's not raylib pourpose.

    So, for next raylib installment, I'll try to focus efforts on library stability and core features to improve the multiplatform raylib experience. I'll try to leave aside new 3d features... 3d requires lot of effort and time.

    Proposed improvements:

    • DONE [core] Frame stuttering when using Sleep() mechanisms. This issue worries me, when avoiding the BUSY_WAIT_LOOP, it seems there is a micro-second delay every second or so, it seems related to the time required to recover from the system halt. I investigated it but I couldn't find a solution yet. Help is welcome! #865 Possible solution: https://github.com/raysan5/raylib/commit/42d56d2f379f2160918c18e400ea657f5c1fd364

    • DONE [core] Input mechanisms review, try to unify it between platforms. Specially focus on:

      • SKIP Raspberry Pi input system, reviewed several times in the last year to replace raw keyboard input reading mechanism by evdev based input reading (inputs already processed by OS), both mechanisms are enabled at this moment for compatibility reasons (SSH keyboard support) but most probably only evdev one should be available. #863
      • DONE Android and HTML5 touch input system should be reviewed to properly scale inputs when framebuffer does not match display resolution and it's consequently scaled and offseted. #163
      • DONE Desktop and HTML5 inputs should be redesigned to support mouse and touch inputs as they were the same, so the same applications could work indistintly with mouse and touch. #726
    • DONE [core] Improve High DPI support. This is tricky, High DPI means that depending on the screen DPI your fixed pixel-size applications will look bigger or smaller on the screen. Solution implies re-scaling application framebuffer and mouse/touch inputs to match an equivalent resolution for the new DPI... it looks like a hack to me and doing that scaling brokes any pixel-perfect design of the original application, for example fonts. Additionally, every OS deals with that in a different way, some OS could automatically scale mouse input or even display window. I have to find a solution... #826, #837

    • DONE [rlgl] This module has already been redesigned several times to improve draw batching mechanism. It was lately reviewed to improve push/pop vertex transformations, similar to OpenGL 1.1. Right now, those stored transformations are not applied to mesh drawing, it shouldn't be difficult to support it: #901 #902

    • DONE [textures] Review ImageDraw() function. This is the base function for all Image drawing funtions (including text drawing on Image), that's the core for the basic 2d software renderer provided by raylib, it has some issues and it should be reviewed. #555

    • DONE [raudio] This module was redesigned some time ago to use the amazing miniaudio library but base design still comes from the previous OpenAL implementation, I would like to review and improve internal library structure and also promote its standalone usage mode. Some points to review:

      • DONE Review AudioBuffers vs AudioStream structures, maybe they can be unified and exposed to the user for custom audio streamming implementations.
      • DONE Review Music structure to avoid an opaque structure and expose Music parameters to the users, it will also make things easier for people creating bindings to raylib.
      • SKIP Support for WAV music streaming, same as any other audio format. Right now WAV files are fully loaded into memory.
    • DONE [examples] Some examples do not work on some platforms and require review, some new examples are also proposed:

      • DONE Review examples based on shaders on HTML5/RPI. #847
      • DONE Review examples based on shaders on RPI. #851
      • DONE Some new examples proposed: #890
      • SKIP Examples using Camera on Android
    • SKIP [rlvk] It's been long time I want to dig into Vulkan backend but the truth is that I can't find the benefits for raylib. In any case, I don't discard jumping into it if I had enough time.

    Well, this is the intended roadmap for next raylib. Nothing set on stone!

    Please, let me know your thoughts! :)

    help wanted good first issue 
    opened by raysan5 42
  • [rnet] Simple and easy-to-use network module for raylib

    [rnet] Simple and easy-to-use network module for raylib

    As already mentioned several times by raylib community, a network module is a missing piece on raylib. Long ago I started drafting a possible network module API for raylib but due to lack of resources, project was stopped... I start this issue to list project specifications and references.

    rnet is a simple and easy-to-use network library. Some desired features:

    • Available as raylib module (rnet.c) but also usable as a standalone library
    • No external dependencies (only the standard system libraries - winsock2.h/socket.h)
    • Self-contained in a single file (header-only) or two portable files: rnet.h + rnet.c
    • Focused on UDP protocol (probably the most useful for games)
    • Support WEB (WebSockets) and ANDROID platforms (if possible)

    Just as a quick reference, the following APIs have been analyzed:

    I'm not an expert on network programming, actually last time I remember doing some sockets code was on University... but here it is basic raynet API proposal (probably very improvable):

    void InitNetworkDevice(NetworkConfig config);
    void CloseNetworkDevice();
    int NetworkConnect(int hostId, const char *address, int port);
    void NetworkDisconnect(int hostId, int connectionId);
    void NetworkSend(int hostId, int connectionId, int channelId, void *data, int length);
    int NetworkReceive(int hostId, int connectionId, int channelId, void *data, int length);
    // Maybe hostId, connectionId and channelId can be a `struct NetworkSocket`.

    Just keep in mind this API is a very rough proposal...

    EDIT: Added to list desired support for WEB and ANDROID.

    new feature 
    opened by raysan5 40
  • Licensing question

    Licensing question

    My submission of raylib 3.0.0 to openSUSE has been declined. The bot sais:

    Contains non-commercial licenses.
    Diff to closest match 153843:
    Found new license CC-BY-NC-3.0 (risk 4) not present in old report
    Found new license SCEA (risk 3) not present in old report

    So raylib now ships things with SCEA and CC-BY-NC-3.0 license? That's correct? Then I'll add them to the spec file.

    opened by jubalh 37
  • raylib 2.0 release planning

    raylib 2.0 release planning

    I'm just listing in this issue the latest planned features that remain to be added for the official release of raylib 2.0.

    In the last 6-7 months raylib has really changed a lot and some long-term objectives for the project have been accomplished, specially remarkable the complete removal of external library dependencies, currently all required dependencies are seamlessly build with raylib library (and included with raylib sources).

    Current list of changes included in this future release could be found in CHANGELOG.

    This is the list of remaining points I'd like to accomplish (a part of taking care of some random bug):

    • [x] LoadFont() - improve font packaging on atlas #375
    • [x] LoadFontSDF() - support signed distance field font atlas generation #376
    • [ ] TCC compiler setup as default to be included with Windows Installer #435
    • [x] Prepare Notepad++ scripts for TCC compiling (source and examples)
    • [x] Review Notepad++ intellisense for new raylib functions (XML)
    • [x] Review raylib examples -> some could be broken...
    • [x] Replace the dwarf model and textures for something more aligned with raylib style (low-poly?)
    • [x] Complete review of Wiki for different platforms compile/usage.

    Those are the my main concerns, feel free to comment if some important point is missing.

    good first issue 
    opened by raysan5 36
  • [build] Support Tiny C compiler

    [build] Support Tiny C compiler

    This improvement has a double pourpose, first just offer an alternative to the already supported C compilers (GCC, clang, MSVC), second, offer a really tiny lightweight environment to play with raylib.

    raylib is provided to students as an installer including the library, a preconfigured version of Notepad++ and MinGW package. This installer is pretty big and I'd like to reduce its size. Current MinGW package is around 200 MB; in comparison, TCC with basic libraries is just around 3 MB.

    help wanted good first issue 
    opened by raysan5 36
  • [audio] Chiptunes support

    [audio] Chiptunes support

    Wondering if there was any support for this. I have been looking into it and am going this route: https://github.com/kd7tck/raylib/commit/8a16d76a6554bbf06969dc9d6bbae715c6f36a75

    Wanted a little feedback, wondering if better libraries are out there.

    opened by kd7tck 36
  • [build] Make raylib available in package managers

    [build] Make raylib available in package managers

    opened by raysan5 32
  • [models] Segfault on OBJ model loading

    [models] Segfault on OBJ model loading

    WARNING: Please, read this note carefully before submitting a new issue:

    It is important to realise that this is NOT A SUPPORT FORUM, this is for reproducible BUGS with raylib ONLY.

    There are lots of generous and helpful people ready to help you out on raylib Discord forum or raylib reddit.

    Remember that asking for support questions here actively takes developer time away from improving raylib.

    Please, before submitting a new issue verify and check:

    • [x] I tested it on latest raylib version from master branch
    • [x] I checked there is no similar issue already reported
    • [x] My code has no errors or misuse of raylib

    Issue description

    I tried to load this model and LoadModel consistently segfaults here. First, there's been an assertion triggering that forbids faces with more than 5 sides; when I manually tweaked the model by simplifying the single offending face, it still barfs with a random segfault somewhere higher in the LoadModel function.

    Now I would attribute that to my tinkering, but a different model also results with a segmentation fault, even if it doesn't trigger the assertion.

    Unfortunately, it's really hard for me to check what exactly causes it, since when I build a debug version, the segfault doesn't happen, and if I'm trying to just add source information and keep all the optimizations, I find it really hard to attach an lldb in a way that makes it recognize the source code.

    To clarify: I'm loading models in an OBJ format. The second model mentioned does not produce an assertion error, but still segfaults (it looks like file parsing goes well, and the code just errors out later).


    I'm working on MacOS Monterey, version 12.5.1, and the error is reproducible both through Rust bindings, as well as the original models_loading example. My compiler is Apple clang version 12.0.0 (clang-1200.0.32.21). Graphics: Intel Iris Plus Graphics 645 1536 MB. Not sure about the OpenGL version.

    Code Example

    The code is taken directly from Raylib's own examples.

    opened by bl-nero 1
  • [camera] Middle mouse based panning not accessible on macos laptops

    [camera] Middle mouse based panning not accessible on macos laptops

    Please, before submitting a new issue verify and check:

    • [x] I tested it on latest raylib version from master branch
    • [x] I checked there is no similar issue already reported
    • [x] My code has no errors or misuse of raylib

    Issue description

    When using the CAMERA_FREE camera mode, panning and rotation are accessible by pressing the mouse wheel / the middle mouse button. While the modifier key for rotation can be reassigned, this does not appear to be the case for the mouse button to be pressed. On macos, there is no middle mouse button by default.

    I am using a macbook pro laptop with a trackpad. One can use third-party apps such as MiddleClick to generate mouse button 3 events. However, when the middle button is pressed using that method using three fingers, further x/y panning motions are not recognized, or are recognized as the mouse wheel, not the mouse pointer.

    As a result, I cannot pan nor rotate the 3D camera at all. I don't know of a workaround either.


    macos 12.6.2, macbook pro with touchpad.

    Issue Screenshot


    Code Example

    This can be reproduced just by building and starting the core_3d_camera_free example on a macos laptop.

    opened by nilsbecker 0
  • OpenGLES 2.0 support on PLATFORM_DESKTOP

    OpenGLES 2.0 support on PLATFORM_DESKTOP

    In the current version of raylib, if you specify OPENGL_VERSION="ES 2.0" when compiling the DESKTOP version, the GL Context at runtime is set correctly by glfw, but the OpenGL ES2 header file is missing, so it cannot be compiled

    This is a diff to make it possible to compile and work using glad's gles2.h

    # build on Windows/Linux/OSX
    cmake -DOPENGL_VERSION="ES 2.0" -B build
    cmake --build build
    cd build/examples
    # windows
    # linux/mac

    On environments that do not support the OpenGL ES2 context, copying and deploying libEGL.dll and libGLESv2.dll (libEGL.dylib, libGLESv2.dylib on Mac OS) from ANGLE (or Chrome, etc.) and it will be loaded by egl and work correctly

    opened by wtnbgo 0
  • [core] fast key presses not registering in IsKeyPressed()

    [core] fast key presses not registering in IsKeyPressed()

    Please, before submitting a new issue verify and check:

    • [x] I tested it on latest raylib version from master branch
    • [x] I checked there is no similar issue already reported
    • [x] My code has no errors or misuse of raylib

    Issue description

    Very fast key presses not registering in IsKeyPressed(), but do show up in GetKeyPressed().

    I've tracked this issue down to using a keyboard with QMK firmware, using mod-tap. When tapping the spacebar, I get both the KeyDown & KeyUp event in the same frame. This key pressed event isn't registered when I check IsKeyPressed(), but does show up when I call GetKeyPressed().

    It exhibits most clearly when trying to play the Pang game on the raylib website: https://www.raylib.com/games/classics/loader.html?name=classic_pang


    This happens both natively and for the raylib web-based demos.

    • Platforms: Web & Desktop
    • OS: OSX 11.7
    • OpenGL:
    INFO: GL: OpenGL device information:
    INFO:     > Vendor:   ATI Technologies Inc.
    INFO:     > Renderer: AMD Radeon Pro 5500M OpenGL Engine
    INFO:     > Version:  4.1 ATI-4.6.21
    INFO:     > GLSL:     4.10

    Issue Screenshot

    Screen Shot 2022-12-11 at 7 12 00 PM

    Screenshot of logging messages for code snippet below.

    Top part of the log is me hitting space on laptop keyboard, bottom is me hitting space on external keyboard running QMK firmware and mod-tap on spacebar.

    Code Example

    minimal code logging discrepancy between IsKeyPressed() and GetKeyPressed():

                    if (IsKeyPressed(KEY_SPACE)) {
                        log_debug("space pressed");
                    for (int k = GetKeyPressed(); k != 0; k = GetKeyPressed()) {
                        log_debug("pressed {}", k);
    opened by dmlary 7
  • Draft: IME support

    Draft: IME support


    This is a fix for issue #1945. We are mainly assuming Japanese input, but this feature can be used for other languages using IME as well.

    We are implementing IME support features in GLFW now:

    • https://github.com/glfw/glfw/pull/2130

    This fix adds the corresponding APIs to raylib.

    It may take a while to be merged in GLFW, so we have created this PR as a draft ahead of time.

    APIs to be added

    • void SetPreeditCallback(PreeditCallback callback)
      • PreeditCallback: void (*PreeditCallback)(int preeditLength, int *preeditString, int blockCount, int *blockSizes, int focusedBlock, int caret)
      • Preedit version of CharCallback.
      • An app gets preedit info (preedit text, blocks, and caret position) by this callback and draws preedit.
      • The reason why we have an app register the callback directly, which is a different from CharCallback, is that this is not like CharCallback, where the input is resolved for each character, but rather requires managing the entire current preedit info at all times. Therefore, it is inefficient for an app to ask for preedit info every frame, so we use a callback to notify the change of preedit info.
    • void SetPreeditCursorRectangle(int x, int y, int w, int h)
      • Set the area of the preedit cursor. This is used to decide the candidate window position that displays a list of conversion candidates. (For example, converting hiragana into kanji in Japanese).
      • In general, the position of this window should be managed by an app side by using this API.
    • void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
      • The getter version of SetPreeditCursorRectangle.
    • void ResetPreedit(void)
      • Clear the current preedit.
    • bool IsImeOn(void)
      • Get if the IME is ON.
    • void SetImeStatus(bool on)
      • Set IME ON/OFF.

    Feature to take candidate list (Win32 ONLY)

    For a detailed explanation, please see below.

    • void SetPreeditCandidateCallback(PreeditCandidateCallback callback)
      • PreeditCandidateCallback: void (*PreeditCandidateCallback)(int candidatesCount, int selectedIndex, int pageStart, int pageSize)
      • The app takes the current candidate status by this callback.
      • To get the candidate text for each index, use GetPreeditCandidate.
    • int *GetPreeditCandidate(int index, int *textCount)
      • Get the current candiadate text of the specified index.

    Specifications for each platform

    Details are in the GLFW PR https://github.com/glfw/glfw/pull/2130.


    • All APIs work fine.


    • All APIs work fine.


    • Use over-the-spot style, so an app side doesn't need to draw preedit.
      • There are 2 main styles: on-the-spot and over-the-spot.
      • In on-the-spot style, an app side draws preedit, and this allows suitable drawing for each app. The other platforms use this style.
      • In over-the-spot style, the IME side draws preedit. This reduces what an app has to do, but it does not allow flexible display.
      • On X11, the behavior of on-the-spot style is not stable, so we use over-the-spot style.
    • Only SetPreeditWindowPosition and GetPreeditWindowPosition work, and other APIs don't work.
    • This is OK for this style because the IME side manages the drawing of preedit, so all an app side needs to do is managing the candidate window position.


    • Currently, we support the minimum required APIs: SetPreeditCallback, SetPreeditWindowPosition, and GetPreeditWindowPosition.

    Sample Application

    We are implementing the sample application RaylibIMEInputSampleApp.

    • https://github.com/clear-code/RaylibIMEInputSampleApp

    We can check all newly added APIs in this application.

    Known issues

    • X11: Some keys (arrow, Enter, BackSpace, ...) are passed to an app during preediting.
      • This will be fixed by https://github.com/glfw/glfw/pull/1972

    Additional planned fixes

    Since the fix of GLFW is large, we will submit separate PRs to GLFW for the following features. For this reason, we have also separated the fixes for raylib.

    • Support soft fullscreen mode for IME features.
      • The candidate window doesn't be displayed correctly with fullscreen mode.
        • The default fullscreen is exclusive, and this causes the problem for IME displaying the candidate window.
      • We already have this fix for GLFW.
        • https://github.com/clear-code/glfw/tree/im-support-fullscreen
      • The corresponding fix of raylib is this.
        • https://github.com/clear-code/raylib/tree/better-ime-support-fullscreen
        • This will add FLAG_SOFT_FULLSCREEN config flag to make the fullscreen not exclusive.

    Feature to take candidate list (Win32 ONLY)

    Usually, the IME displays the candidate window, so the app side doesn't need to get canidate list.

    However, sometimes, we need to display it on the app side. For example, it could be for displaying it correctly on exclusive fullscreen, or for using a custom design.

    This is especially common in games for Windows.

    This feature is OFF by default. We can use this by setting the FLAG_MANAGE_PREEDIT_CANDIDATE config flag.

    Currently, this feature is available only on Win32, since this feature is especially common on Windows. We'd like to make it available on every platform if possible, but it may be difficult because of platform specific issues.

    This feature is also involved in the issue with fullscreen and IME. If fullscreen is strongly exclusive, then the candidate window of IME can't be displayed correctly. This problem is especially serious in Windows, so this feature is one workaround for fullscreen on Windows.

    We also have another fix that reduces fullscreen exclusivity for the IME, but the fix of GLFW for Windows is tricky... (Please see Additional planned fixes)

    We can check this behavior in the sample application with MANAGE_PREEDIT_CANDIDATE cmake option.

    • https://github.com/clear-code/RaylibIMEInputSampleApp/wiki/CMake-Build-Options#manage_preedit_candidate
    opened by daipom 7
  • [models] Question about how to add hooks

    [models] Question about how to add hooks


    First I'll try to explain the problem in a nutshell.

    All model formats I have seen so far simply store the filepath of the assets in the model file. I find that solution conceptually broken for several reasons, and to my experience there's lot of problems with models because of this. For example:

    1. people tend to store absolute paths in them, which is just plainly wrong, my directory structure is NOT the same as the model creator's
    2. even if it's a relative path, there's always portability issues (Win directory separator is \, while Linux uses /, VMS uses [dir.dir]file etc.)
    3. not all engines store the assets in separate files. Many use some kind of module or DLC system (for example, using ZIP or in-house developed archives)
    4. what if the asset is inlined in the model file?
    5. what if the model creator have used .bmp for textures, but an engine doesn't want to use that format (for obvious reasons)?

    So when I designed M3D, I took a different approach, only the asset's unique name is stored in the model file (kinda like an ID), and the application using the M3D SDK supposed to provide two hooks: the first one receives the name of the asset and returns a pointer to a buffer, and the second optional one frees that buffer if it was allocated in the first hook.

    However the M3D SDK is hidden with raylib (which is good practice), and is integrated in raylib is as follows (actually I wanted to use the raylib functions as-is, but there's a prototype difference with the arguments, char* vs const char* and void* vs. unsigned char*, hence the need for these wrapper functions):

    unsigned char *m3d_loaderhook(char *fn, unsigned int *len) { return LoadFileData((const char *)fn, len); }
    void m3d_freehook(void *data) { UnloadFileData((unsigned char *)data); }

    Obviously this simple solution only works for the most trivial use-case, when assets are stored in separate files in the same current working directory (or all of them stored in the same archive). I'd like to change that, and provide a way for the application to specify these hooks and therefore implement whatever asset storing mechanism they'd like.

    (FYI, I've always wanted to use LoadFileData because it has SetLoadFileDataCallback, but when I actually have tried this, I run into issues: it's common to all file operations, both for the model itself and the assets, and not just for model's assets. The model is passed as a filename, but assets as a unique name, and assets could be stored in a different place (like in a "skin DLC" for example). And then I'm not sure what about free as a custom storage mechanism probably provides its own freeing, therefore the asset buffers shouldn't be freed when the model is unloaded, otherwise that would result in double free (or triple or quadriple if several models are using the same texture asset). Currently there's no way of turning the UnloadFileData call off in m3d_freehook.)

    My question is, since only model's filename is passed to LoadModel and not the asset's hooks, what would be the preferred, raylib philosophy compatible way here? I am thinking about using two static function pointers, which are initialized as m3d_loaderhook and m3d_freehook. Then the app can change these before the first LoadModel call if it wishes to implement a custom asset storage mechanism. What do you think about this? If using two static function pointer variables is okay, what would be your preference for the names for these two that aligns with raylib? My guess is, they should somehow reflect being used in LoadModel, so maybe LoadModelAssetGet and LoadModelAssetFree? Or should a SetLoadModelAssetCallback be added?

    If you don't like the idea of two static variables, then I'm open to any suggestion. Any solution you prefer and allows the application to provide its own way of loading the assets is okay. (Again, an app might wish to use different hooks for loading the model and the assets, and on unload the model's buffer must be freed but the asset's not necessarily.)

    Thank you for your answer, bzt

    opened by bztsrc 7
  • 4.2.0(Aug 13, 2022)

    New raylib release! Nine months after latest raylib, here it is a new version. It was supposed to be just a small update but, actually, it's a huge update with lots of changes and improvements. It has been possible thanks to the many contributors that have helped with issues and improvements, it's the update with more contributors to date and that's amazing!

    Some numbers to start with:

    • +200 closed issues (for a TOTAL of 1230!)
    • +550 commits since previous RELEASE (for a TOTAL of +6000!)
    • +20 functions ADDED to raylib API (for a TOTAL of 502!)
    • +60 functions REVIEWED/REDESIGNED
    • +70 new contributors (for a TOTAL of +360!)

    Highlights for raylib 4.2:

    • raylib extra libraries cleanup: raylib has been on diet and all the extra libraries included on previous releases have been removed from raylib. Now raylib only includes the original 7 raylib modules: rcore, rlgl, rshapes, rtextures, rtext, rmodels and raudio. But no worries, extra libraries have not been deleted, they have been moved to their own repos for better maintainability and more focus on its functionality. The libraries moved out from raylib repo are: raygui, physac, rmem, reasings and raudio (standalone mode). On that same line, a new amazing GitHub group: raylib-extras has been created by @JeffM2501 to contain raylib extra libraries as well as other raylib add-ons provided by the community. Jeff has done an amazing work on that line, providing multiple libraries and examples for raylib, like custom first-person and third person camera systems, Dear ImGui raylib integration, multiple specific examples and even a complete RPG Game Example! Great work Jeff! :D

    • raylib examples review: The +120 raylib examples have been reviewed to add clearer information about when they were first created (raylib version used) and when they were updated for the last time. But the greatest improvement for users has been the addition of an estimated difficulty level for every example, web has been updated accordingly to reflect those difficulty levels. Now examples are classified with 1 to 4 stars depending on difficulty to help users with their learning process. Personally, I think this "small" addition could be a game-changer to better guide new users on the library adoption! Additionally, this new raylib release includes 7 new examples; the most interesting one: text_codepoints_loading that illustrates how to load and draw custom codepoints from a font file, very useful for Asian languages.

    • rres 1.0: New rres resources packaging file-format, including a rres-raylib library implementation and rrespacker tool. rres file format has been under development for +8 years and it was originally created to be part of raylib. It was highly inspired by XNA XNB resources file format but design has changed a lot along the years. This first release of the format specs is engine-agnostic and has been designed to be portable to any engine, including lots of professional features like data processing, compression and encryption.

    • raygui 3.2: The official raylib immediate-mode gui library designed for tools development has been updated to a new version aligned with raylib 4.2. Multiple controls have been reviewed for library consistency, now all controls follow a similar function signature. It has been battle-tested with the development of +8 published tools in the last months. The tools can be seen and used for free in the raylib technologies tools page. Worth mentioning that several of those tools have been open sourced for anyone to use, compile, contribute or learn how the code works.

    • raylib_parser: Multiple contributors using the tool to automatize bindings creation have contributed with improvements of this tool to parse raylib.h (and other raylib-style headers) to tokenize its enums, structs and functions. Processed data can be exported to custom file formats (i.e XML, JSON, LUA) for bindings generation or even docs generation if required.

    • New file system API: Current API has been redesigned to be more comprehensive and better aligned with raylib naming conventions, two new functions are provided LoadDirectoryFiles()/LoadDirectoryFilesEx() to load a FilePathList for provided path, supporting extension filtering and recursive directory scan. LoadDroppedFiles() has been renamed to better reflect its internal functionality. Now, all raylib functions that start with Load*() allocate memory internally and a equivalent Unload*() function is defined to take care of that memory internally when not required any more!

    • New audio stream processors API (experimental): Now real-time audio stream data processors can be added using callbacks to played Music. It allows users to create custom effects for audio like delays of low-pass-filtering (example provided). The new API uses a callback system and it's still _ highly experimental_, it differs from the usual level of complexity that provides raylib and it is intended for advance users. It could change in the future but, actually, raudio module is in the spotlight for future updates; miniaudio implements a new higher-level API that can be useful in the future for raylib.

    As always, there are more improvements than the key features listed, make sure to check raylib CHANGELOG for the detailed list of changes; for this release a WARNING flag has been added to all the changes that could affect bindings or productivity code. raylib keeps improving one more version and a special focus on maintainability has been put on the library for the future. Specific/advance functionality will be provided through raylib-extras repos and raylib main repo devlelopment will be focused on what made raylib popular: being a simple and easy-to-use library to enjoy videogames programming.

    Enjoy gamedev/tools/graphics programming! :)

    New Contributors

    • @KonPet made their first contribution in https://github.com/raysan5/raylib/pull/2111
    • @Schweinepriester made their first contribution in https://github.com/raysan5/raylib/pull/2114
    • @WIITD made their first contribution in https://github.com/raysan5/raylib/pull/2116
    • @lukekras made their first contribution in https://github.com/raysan5/raylib/pull/2121
    • @ampers0x26 made their first contribution in https://github.com/raysan5/raylib/pull/2126
    • @sol-vin made their first contribution in https://github.com/raysan5/raylib/pull/2130
    • @ronnieholm made their first contribution in https://github.com/raysan5/raylib/pull/2136
    • @WilledgeR made their first contribution in https://github.com/raysan5/raylib/pull/2148
    • @wolfenrain made their first contribution in https://github.com/raysan5/raylib/pull/2149
    • @ytrms made their first contribution in https://github.com/raysan5/raylib/pull/2156
    • @pancakevirus made their first contribution in https://github.com/raysan5/raylib/pull/2163
    • @jasonswearingen made their first contribution in https://github.com/raysan5/raylib/pull/2168
    • @anders-n08 made their first contribution in https://github.com/raysan5/raylib/pull/2175
    • @Toby222 made their first contribution in https://github.com/raysan5/raylib/pull/2179
    • @HarriP made their first contribution in https://github.com/raysan5/raylib/pull/2189
    • @jdeokkim made their first contribution in https://github.com/raysan5/raylib/pull/2196
    • @petelliott made their first contribution in https://github.com/raysan5/raylib/pull/2202
    • @eutro made their first contribution in https://github.com/raysan5/raylib/pull/2208
    • @ptarabbia made their first contribution in https://github.com/raysan5/raylib/pull/2215
    • @wereii made their first contribution in https://github.com/raysan5/raylib/pull/2217
    • @pitpit made their first contribution in https://github.com/raysan5/raylib/pull/2233
    • @salotz made their first contribution in https://github.com/raysan5/raylib/pull/2238
    • @planetis-m made their first contribution in https://github.com/raysan5/raylib/pull/2243
    • @shivajiva101 made their first contribution in https://github.com/raysan5/raylib/pull/2253
    • @tusharsingh09 made their first contribution in https://github.com/raysan5/raylib/pull/2254
    • @glorantq made their first contribution in https://github.com/raysan5/raylib/pull/2260
    • @gtrxAC made their first contribution in https://github.com/raysan5/raylib/pull/2264
    • @hero2002 made their first contribution in https://github.com/raysan5/raylib/pull/2270
    • @ArchieAtkinson made their first contribution in https://github.com/raysan5/raylib/pull/2276
    • @hartmannathan made their first contribution in https://github.com/raysan5/raylib/pull/2277
    • @MatthewOwens made their first contribution in https://github.com/raysan5/raylib/pull/2281
    • @phil-shenk made their first contribution in https://github.com/raysan5/raylib/pull/2296
    • @royqh1979 made their first contribution in https://github.com/raysan5/raylib/pull/2298
    • @siddharthroy12 made their first contribution in https://github.com/raysan5/raylib/pull/2308
    • @makuto made their first contribution in https://github.com/raysan5/raylib/pull/2318
    • @megagrump made their first contribution in https://github.com/raysan5/raylib/pull/2324
    • @audinue made their first contribution in https://github.com/raysan5/raylib/pull/2319
    • @locriacyber made their first contribution in https://github.com/raysan5/raylib/pull/2329
    • @zigster64 made their first contribution in https://github.com/raysan5/raylib/pull/2332
    • @DavidLyhedDanielsson made their first contribution in https://github.com/raysan5/raylib/pull/2347
    • @chrisws made their first contribution in https://github.com/raysan5/raylib/pull/2366
    • @IrishBruse made their first contribution in https://github.com/raysan5/raylib/pull/2375
    • @AnilBK made their first contribution in https://github.com/raysan5/raylib/pull/2376
    • @Hejsil made their first contribution in https://github.com/raysan5/raylib/pull/2383
    • @tixvage made their first contribution in https://github.com/raysan5/raylib/pull/2384
    • @guidoism made their first contribution in https://github.com/raysan5/raylib/pull/2385
    • @kristianlm made their first contribution in https://github.com/raysan5/raylib/pull/2390
    • @futureapricot made their first contribution in https://github.com/raysan5/raylib/pull/2396
    • @joaotavora made their first contribution in https://github.com/raysan5/raylib/pull/2398
    • @tana made their first contribution in https://github.com/raysan5/raylib/pull/2419
    • @ZimonIsHim made their first contribution in https://github.com/raysan5/raylib/pull/2423
    • @twuky made their first contribution in https://github.com/raysan5/raylib/pull/2431
    • @saccharineboi made their first contribution in https://github.com/raysan5/raylib/pull/2428
    • @FireFlyForLife made their first contribution in https://github.com/raysan5/raylib/pull/2424
    • @jcgamestoy made their first contribution in https://github.com/raysan5/raylib/pull/2437
    • @leomonta made their first contribution in https://github.com/raysan5/raylib/pull/2442
    • @ryupold made their first contribution in https://github.com/raysan5/raylib/pull/2449
    • @lazaray made their first contribution in https://github.com/raysan5/raylib/pull/2444
    • @Capital-EX made their first contribution in https://github.com/raysan5/raylib/pull/2466
    • @anggape made their first contribution in https://github.com/raysan5/raylib/pull/2481
    • @noodlecollie made their first contribution in https://github.com/raysan5/raylib/pull/2485
    • @patm1987 made their first contribution in https://github.com/raysan5/raylib/pull/2486
    • @gulrak made their first contribution in https://github.com/raysan5/raylib/pull/2446
    • @naveensrinivasan made their first contribution in https://github.com/raysan5/raylib/pull/2496
    • @dawranliou made their first contribution in https://github.com/raysan5/raylib/pull/2509
    • @Tekkitslime made their first contribution in https://github.com/raysan5/raylib/pull/2521
    • @TheTophatDemon made their first contribution in https://github.com/raysan5/raylib/pull/2525
    • @quantumedbox made their first contribution in https://github.com/raysan5/raylib/pull/2536
    • @hanaxar made their first contribution in https://github.com/raysan5/raylib/pull/2539
    • @Bitwise101 made their first contribution in https://github.com/raysan5/raylib/pull/2559
    • @CastimierDev made their first contribution in https://github.com/raysan5/raylib/pull/2570
    • @MikeDX made their first contribution in https://github.com/raysan5/raylib/pull/2581
    • @Timofffee made their first contribution in https://github.com/raysan5/raylib/pull/2585
    • @andsiu made their first contribution in https://github.com/raysan5/raylib/pull/2587
    • @evanTj made their first contribution in https://github.com/raysan5/raylib/pull/2589
    • @kirigirihitomi made their first contribution in https://github.com/raysan5/raylib/pull/2591
    • @MyUncle made their first contribution in https://github.com/raysan5/raylib/pull/2592
    • @wiertek made their first contribution in https://github.com/raysan5/raylib/pull/2594
    • @veins1 made their first contribution in https://github.com/raysan5/raylib/pull/2579
    • @sDos280 made their first contribution in https://github.com/raysan5/raylib/pull/2602
    • @BlueStaggo made their first contribution in https://github.com/raysan5/raylib/pull/2604
    • @TheManTheMythTheGameDev made their first contribution in https://github.com/raysan5/raylib/pull/2608
    • @ramiromagno made their first contribution in https://github.com/raysan5/raylib/pull/2611
    • @sysrpl made their first contribution in https://github.com/raysan5/raylib/pull/2617
    • @DaJobat made their first contribution in https://github.com/raysan5/raylib/pull/2620
    • @archie2x made their first contribution in https://github.com/raysan5/raylib/pull/2622
    • @ERmilburn02 made their first contribution in https://github.com/raysan5/raylib/pull/2627
    • @SomeUnusualGames made their first contribution in https://github.com/raysan5/raylib/pull/2628

    Full Changelog: https://github.com/raysan5/raylib/compare/4.0.0...4.2.0

    Source code(tar.gz)
    Source code(zip)
    raylib-4.2.0_linux_amd64.tar.gz(1.59 MB)
    raylib-4.2.0_linux_i386.tar.gz(927.61 KB)
    raylib-4.2.0_macos.tar.gz(2.54 MB)
    raylib-4.2.0_webassembly.zip(505.63 KB)
    raylib-4.2.0_win32_mingw-w64.zip(109.92 KB)
    raylib-4.2.0_win32_msvc16.zip(3.22 MB)
    raylib-4.2.0_win64_mingw-w64.zip(778.07 KB)
    raylib-4.2.0_win64_msvc16.zip(2.21 MB)
    raylib_installer_v4.2.mingw.exe(73.39 MB)
    raylib_installer_v4.2.tcc.exe(35.21 MB)
    raylib_installer_v4.2.zig.exe(70.50 MB)
  • 4.0.0(Nov 4, 2021)

    It's been about 6 months since last raylib release and it's been 8 years since I started with this project, what an adventure! It's time for a new release: raylib 4.0, the biggest release ever and an inflexion point for the library. Many hours have been put in this release to make it special, many library details have been polished: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this raylib 4.0 to be a long term version (LTS), stable and complete enough for any new graphic/game/tool application development.

    Let's start with some numbers:

    • +130 closed issues (for a TOTAL of +1030!)
    • +550 commits since previous RELEASE
    • +20 functions ADDED to raylib API
    • +60 functions ADDED to rlgl API
    • +60 new contributors (for a TOTAL of +275!)

    Highlights for raylib 4.0:

    • Naming consistency and coherency: raylib API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. struct CharInfo to struct GlyphInfo). Output log messages have been also improved to show more info to the users. Several articles have been writen in this process: raylib_syntax analysis and raylib API usage analysis. In general, a big polishment of the library to make it more consistent and coherent.

    • Event Automation System: This new experimental feature has been added for future usage, it allows to record input events and re-play them automatically. This feature could be very useful to automatize examples testing but also for tutorials with assited game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental.

    • Custom game-loop control: As requested by some advance users, the game-loop control can be exposed compiling raylib with the config flag: SUPPORT_CUSTOM_FRAME_CONTROL. It's intended for advance users that want to control the events polling and also the timming mechanisms of their games.

    • rlgl 4.0: This module has been completely decoupled from platform layer and raylib, now rlgl single-file header-only library only depends on the multiple OpenGL backends supported, even the dependency on raymath has been removed. Additionally, support for OpenGL 4.3 has been added, supporting compute shaders and Shader Storage Buffer Objects (SSBO). Now rlgl can be used as a complete standalone portable library to wrap several OpenGL version and providing a simple and easy-to-use pseudo-OpenGL immediate-mode API.

    • raymath 1.5: This module has been reviewed and some new conventions have been adopted to make it more portable and self-contained:

      • Functions are self-contained, no function use other raymath function inside, required code is directly re-implemented
      • Functions input parameters are always received by value
      • Functions use always a "result" variable for return
      • Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
    • raygui 3.0: The official raylib immediate-mode gui library (included in raylib/src/extras) has been updated to a new version, embedding the icons collection and adding mulstiple improvements. It has been simplified and constrained for a better focus on its task: provide a simple and easy-to-use immediate-mode-gui library for small tools development.

    • raylib_parser: Added new tool to parse raylib.h and tokenize its enums, structs and functions, extracting all required info (name, params, descriptions...) into custom output formats (TXT, XML, JSON...) for further processing. This tool is specially useful to automatize bindings generation. Hopefully, this tool will make life easier to binding creators to update their bindings for raylib 4.0 or adding new ones!

    • Zig and Odin official support for raylib: Those two new amazing programming languages are officially supporting raylib, Zig lists raylib as an official example for C interoperatibility and Odin officially supports raylib as a vendor library. Both languages also have several bingings to raylib. Additionally, Zig build system supported has been added to compile raylib library and examples.

    Those are some of the key features for this new release but actually there is way more! Support for VOX (MagikaVoxel) 3d model format has been added, new raylib_game_template repo shared, new EncodeDataBase64() and DecodeDataBase64() functions added, improved HiDPI support, new DrawTextPro() with support for text rotations, completely reviewed glTF models loading, added SeekMusicStream() for music seeking, many new examples and +20 examples reviewed... hundreds of improvements and bug fixes! Make sure to check CHANGELOG for a detailed list of changes!

    Undoubtely, this is the best raylib ever. Enjoy gamedev/tools/graphics programming! :)

    Source code(tar.gz)
    Source code(zip)
    raylib-4.0.0_android_api29_arm64.tar.gz(1.20 MB)
    raylib-4.0.0_android_api29_x86_64.tar.gz(118.88 KB)
    raylib-4.0.0_linux_amd64.tar.gz(1.42 MB)
    raylib-4.0.0_linux_i386.tar.gz(779.46 KB)
    raylib-4.0.0_macos.tar.gz(1.28 MB)
    raylib-4.0.0_webassembly.zip(479.29 KB)
    raylib-4.0.0_win32_mingw-w64.zip(1.41 MB)
    raylib-4.0.0_win32_msvc16.zip(2.81 MB)
    raylib-4.0.0_win64_mingw-w64.zip(1.28 MB)
    raylib-4.0.0_win64_msvc16.zip(1.99 MB)
    raylib_installer_v4.0.mingw.exe(69.66 MB)
    raylib_installer_v4.0.tcc.exe(34.52 MB)
    raylib_installer_v4.0.zig.exe(69.10 MB)
  • 3.7.0(Apr 26, 2021)

    April 2021, it's been about 4 months since last raylib release and here it is already a new one, this time with a bunch of internal redesigns and improvements. Surprisingly, on April the 8th I was awarded for a second time with the Google Open Source Peer Bonus Award for my contribution to open source world with raylib and it seems the library is getting some traction, what a better moment for a new release? Let's see what can be found in this new version:

    Let's start with some numbers:

    • +100 closed issues (for a TOTAL of +900!)
    • +400 commits since previous RELEASE
    • +50 functions ADDED (+30 of them to rlgl API)
    • +30 functions REVIEWED/REDESIGNED
    • +40 new contributors (for a TOTAL of +210!)

    Highlights for raylib 3.7:

    • REDESIGNED: rlgl module for greater abstraction level. This suppose an important change in raylib architecture, now rlgl functionality is self-contained in the module and used by higher-level layers (specially by core module), those upper layers are the ones that expose functionality to the main API when required, for example the Shaders, Mesh and Materials functionality. Multiple rlgl functions have been renamed for consistency, in this case, following the rl*() prefix convention. Functions have also been reorganized internally by categories and GenTexture*() functions have been removed from the library and moved to models_material_pbr example.

    • REDESIGNED: VR simulator and stereo rendering mechanism. A brand new API has been added, more comprehensive and better integrated with raylib, the new stereo rendering can be combined with RenderTexture and Shader API allowing the user to manage fbo and distortion shader directly. Also, the new rendering mechanism supports instancing on stereo rendering! Check the updated core_vr_simulator example for reference!

    • ADDED: New file access callbacks system. Several new callback functions have been added to the API to allow custom file loaders. A nice example it's the raylib integration with a virtual file system PhysFS.

    • ADDED: glTF animations support. glTF is the preferred models file format to be used with raylib and along the addition of a models animation API on latest raylib versions, now animations support for glTF format has come to raylib, thanks for this great contribution to Hristo Stamenov

    • ADDED: Music streaming support from memory. raylib has been adding the Load*FromMemory() option to all its supported file formats but music streaming was not supported yet... until now. Thanks to this great contribution by Agnis "NeZvērs" Aldiņš, now raylib supports music streamming from memory data for all supported file formats: WAV, OGG, MP3, FLAC, XM and MOD.

    • RENAMED: enums values for consistency. Most raylib enums names and values names have been renamed for consistency, now all value names start with the type of data they represent. It increases clarity and readability when using those values and also improves overall library consistency.

    Beside those key changes, many functions have been reviewed with improvements and bug fixes, many of them contributed by the community! Thanks! And again, this release sets a new milestone for raylib library. Make sure to check CHANGELOG for detailed list of changes! Hope you enjoy this new raylib installment!

    Happy gamedev/tools/graphics programming! :)

    Source code(tar.gz)
    Source code(zip)
    raylib-3.7.0_android_api29_arm64.tar.gz(25.87 KB)
    raylib-3.7.0_android_api29_x86_64.tar.gz(25.87 KB)
    raylib-3.7.0_linux_amd64.tar.gz(1.22 MB)
    raylib-3.7.0_linux_i386.tar.gz(634.14 KB)
    raylib-3.7.0_macos.tar.gz(1.19 MB)
    raylib-3.7.0_webassembly.zip(372.16 KB)
    raylib-3.7.0_win32_mingw-w64.zip(1.22 MB)
    raylib-3.7.0_win32_msvc16.zip(2.03 MB)
    raylib-3.7.0_win64_mingw-w64.zip(1.11 MB)
    raylib-3.7.0_win64_msvc16.zip(2.09 MB)
    raylib_installer_v370.mingw.exe(104.57 MB)
  • 3.5.0(Dec 25, 2020)

    It's December 25th... this crazy 2020 is about to finish and finally the holidays gave me some time to put a new version of raylib. It's been 9 months since last release and last November raylib become 7 years old... I was not able to release this new version back then but here it is. Many changes and improvements have happened in those months and, even, last August, raylib was awarded with an Epic Megagrant! Bindings list kept growing to +50 programming languages and some new platforms have been supported. Let's see this new version details:

    First, some general numbers of this new update:

    • +650 commits since previous RELEASE
    • +30 functions ADDED (for a TOTAL of 475!)
    • +90 functions REVIEWED/REDESIGNED
    • +30 contributors (for a TOTAL of 170!)
    • +8 new examples (for a TOTAL of +120!)

    Here the list with some highlights for raylib 3.5.

    • NEW Platform supported: Raspberry Pi 4 native mode (no X11 windows) through DRM subsystem and GBM API. Actually this is a really interesting improvement because it opens the door to raylib to support other embedded platforms (Odroid, GameShell, NanoPi...). Also worth mentioning the un-official homebrew ports of raylib for PS4 and PSVita.

    • NEW configuration options exposed: For custom raylib builds, config.h now exposes more than 150 flags and defines to build raylib with only the desired features, for example, it allows to build a minimal raylib library in just some KB removing all external data filetypes supported, very useful to generate small executables or embedded devices.

    • NEW automatic GIF recording feature: Actually, automatic GIF recording (CTRL+F12) for any raylib application has been available for some versions but this feature was really slow and low-performant using an old gif library with many file-accesses. It has been replaced by a high-performant alternative (msf_gif.h) that operates directly on memory... and actually works very well! Try it out!

    • NEW RenderBatch system: rlgl module has been redesigned to support custom render batches to allow grouping draw calls as desired, previous implementation just had one default render batch. This feature has not been exposed to raylib API yet but it can be used by advance users dealing with rlgl directly. For example, multiple RenderBatch can be created for 2D sprites and 3D geometry independently.

    • NEW Framebuffer system: rlgl module now exposes an API for custom Framebuffer attachments (including cubemaps!). raylib RenderTexture is a basic use-case, just allowing color and depth textures, but this new API allows the creation of more advance Framebuffers with multiple attachments, like the G-Buffers. GenTexture*() functions have been redesigned to use this new API.

    • Improved software rendering: raylib Image*() API is intended for software rendering, for those cases when no GPU or no Window is available. Those functions operate directly with multi-format pixel data on RAM and they have been completely redesigned to be way faster, specially for small resolutions and retro-gaming. Low-end embedded devices like microcontrollers with custom displays could benefit of this raylib functionality!

    • File loading from memory: Multiple functions have been redesigned to load data from memory buffers instead of directly accessing the files, now all raylib file loading/saving goes through a couple of functions that load data into memory. This feature allows custom virtual-file-systems and it gives more control to the user to access data already loaded in memory (i.e. images, fonts, sounds...).

    • NEW Window states management system: raylib core module has been redesigned to support Window state check and setup more easily and also before/after Window initialization, SetConfigFlags() has been reviewed and SetWindowState() has been added to control Window minification, maximization, hidding, focusing, topmost and more.

    • NEW GitHub Actions CI/CD system: Previous CI implementation has been reviewed and improved a lot to support multiple build configurations (platforms, compilers, static/shared build) and also an automatic deploy system has been implemented to automatically attach the diferent generated artifacts to every new release. As the system seems to work very good, previous CI platforms (AppVeyor/TravisCI) have been removed.

    A part of those changes, many new functions have been added, some redundant functions removed and many functions have been reviewed for consistency with the full API (function name, parameters name and order, code formatting...). Again, this release is a great improvement for raylib and marks the way forward for the library. Make sure to check CHANGELOG for details! Hope you enjoy it!

    Happy holidays! :)

    Source code(tar.gz)
    Source code(zip)
    raylib-3.5.0_android_api29_arm64.tar.gz(1.00 MB)
    raylib-3.5.0_android_api29_x86_64.tar.gz(1.13 MB)
    raylib-3.5.0_linux_amd64.tar.gz(1.15 MB)
    raylib-3.5.0_linux_i386.tar.gz(599.20 KB)
    raylib-3.5.0_macos.tar.gz(1.13 MB)
    raylib-3.5.0_webassembly.zip(352.73 KB)
    raylib-3.5.0_win32_mingw-w64.zip(1.16 MB)
    raylib-3.5.0_win32_msvc16.zip(1.91 MB)
    raylib-3.5.0_win64_mingw-w64.zip(1.04 MB)
    raylib-3.5.0_win64_msvc16.zip(1.96 MB)
    raylib-noexamples-3.5.0.tar.gz(4.12 MB)
    raylib_installer_v350.mingw.exe(102.59 MB)
    raylib_installer_v350.tcc.exe(39.19 MB)
  • 3.0.0(Apr 1, 2020)

    After 10 months of intense development, new raylib version is ready. Despite primary intended as a minor release, the CHANGELIST has grown so big and the library has changed so much internally that it finally became a major release. Library internal ABI has received a big redesign and review, targeting portability, integration with other platforms and making it a perfect option for other progamming language bindings.

    • All global variables from the multiple raylib modules have been moved to a global context state, it has several benefits, first, better code readability with more comprehensive variables naming and categorization (organized by types, i.e. CORE.Window.display.width, CORE.Input.Keyboard.currentKeyState or RLGL.State.modelview). Second, it allows better memory management to load global context state dynamically when required (not at the moment), making it easy to implement a hot-reloading mechanism if desired.

    • All memory allocations on raylib and its dependencies now use RL_MALLOC, RL_FREE and similar macros. Now users can easely hook their own memory allocations mechanism if desired, having more control over memory allocated internally by the library. Additionally, it makes it easier to port the library to embedded devices where memory control is critical. For more info check raylib issue #1074.

    • All I/O file accesses from raylib are being moved to memory data access, now all I/O file access is centralized into just four functions: LoadFileData(), SaveFileData(), LoadFileText(), SaveFileText(). Users can just update those functions to any I/O file system. This change makes it easier to integrate raylib with Virtual File Systems or custom I/O file implementations.

    • All raylib data structures have been reviewed and optimized for pass-by-value usage. One of raylib distinctive design decisions is that most of its functions receive and return data by value. This design makes raylib really simple for newcomers, avoiding pointers and allowing complete access to all structures data in a simple way. The downside is that data is copied on stack every function call and that copy could be costly so, all raylib data structures have been optimized to stay under 64 bytes for fast copy and retrieve.

    • All raylib tracelog messages have been reviewd and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading/unloading issues are properly reported with more detailed and visual messages.

    • raudio module has been internally reviewed to accomodate the new Music structure (converted from previous pointer format) and the module has been adapted to the highly improved miniaudio v0.10.

    • text module reviewed to improve fonts generation and text management functions, Font structure has been redesigned to better accomodate characters data, decoupling individual characters as Image glyphs from the font atlas parameters. Several improvements have been made to better support Unicode strings with UTF-8 encoding.

    • Multiple new examples added (most of them contributed by raylib users) and all examples reviewed for correct execution on most of the supported platforms, specially Web and Raspberry Pi. A detailed categorized table has been created on github for easy examples navigation and code access.

    • New GitHub Actions CI system has been implemented for Windows, Linux and macOS code and examples compilation on every new commit or PR to make sure library keeps stable and usable with no breaking bugs.

    Note that only key changes are listed here but there is way more! About 30 new functions, multiple functions reviewed, bindings to +40 programming languages and great samples/demos/tutorials created by the community, including raylib integration with Spine, Unity, Tiled, Nuklear, enet and more!

    It has been 10 months of improvements to create the best raylib ever.

    Welcome to raylib 3.0.

    Source code(tar.gz)
    Source code(zip)
    raylib-3.0.0-Linux-amd64.tar.gz(2.45 MB)
    raylib-3.0.0-Linux-i386.tar.gz(2.10 MB)
    raylib-3.0.0-macOS.tar.gz(4.06 MB)
    raylib-3.0.0-Win32-mingw.zip(1.01 MB)
    raylib-3.0.0-Win32-msvc15.zip(1.78 MB)
    raylib-3.0.0-Win64-mingw.zip(1.49 MB)
    raylib-3.0.0-Win64-msvc15.zip(1.84 MB)
    raylib-noexamples-3.0.0.tar.gz(4.18 MB)
    raylib_installer_v300.mingw.exe(95.43 MB)
    raylib_installer_v300.tcc.exe(32.53 MB)
  • 2.6.0(Feb 3, 2020)

    This release is just intended to keep a tag of raylib 2.6 state before moving to the upcoming raylib 3.0 release.

    On raylib 3.0 all modules globals have been moved to a global context state, using the name of the module (in capitals) as the object instance. It implied a very big refactoring of all the code, renaming ALL the global variables used in every module... but new code is more readable and global variables around the code are easily detected.

    raylib 3.0 develop branch was used on GGJ2020 to develop a game and compile it for Desktop and HTML5 platforms, it worked very good. raylib 3.0 has also been tested on RaspberryPi and compiled with no errors for all CI available platforms. At this point raylib 3.0 should be stable.

    From now on master branch will include this new design, a 2.6 branch will be kept for reference.

    Source code(tar.gz)
    Source code(zip)
    raylib-2.6.0-Linux-amd64.tar.gz(2.43 MB)
    raylib-2.6.0-Linux-i386.tar.gz(2.07 MB)
    raylib-2.6.0-macOS.tar.gz(4.04 MB)
    raylib-2.6.0-Win32-mingw.zip(2.46 MB)
    raylib-2.6.0-Win32-msvc15.zip(1.90 MB)
    raylib-2.6.0-Win64-mingw.zip(2.67 MB)
    raylib-2.6.0-Win64-msvc15.zip(1.94 MB)
  • 2.5.0(May 31, 2019)

    After almost one years since latest raylib installment, here it is raylib 2.5. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the CHANGELOG, and here it is a short recap with the highlight improvements.

    • New window management and filesystem functions to query monitor information, deal with clipboard, check directory files info and even launch a URL with default system web browser. Experimental High-DPI monitor support has also been added through a compile flag.

    • Redesigned Gamepad mechanism, now generic for all platforms and gamepads, no more specific gamepad configurations. Redesigned UWP input system, now raylib supports UWP seamlessly, previous implementation required a custom input system implemented in user code.

    • rlgl module has been redesigned to support a unique buffer for shapes drawing batching, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, rlPushMatrix()/rlPopMatrix() functionality has been reviewed to behave exactly like OpenGL 1.1, models_rlgl_solar_system example has been added to illustrate this behaviour.

    • VR simulator has been reviewed to allow custom configuration of Head-Mounted-Device parameters and distortion shader, core_vr_simulator has been properly adapted to showcase this new functionality, now the VR simulator is a generic configurable stereo rendering system that allows any VR device simulation with just a few lines of code or even dynamic tweaking of HMD parameters.

    • Support for Unicode text drawing; now raylib processes UTF8 strings on drawing, supporting Unicode codepoints, allowing rendering mostly any existent language (as long as the font with the glyphs is provided). An amazing example showing this feature has also been added: text_unicode.

    • Brand new text management API, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually.

    • Multiple new shapes and textures drawing functions to support rings (DrawRing(), DrawRingLines()), circle sectors (DrawCircleSector(), DrawCircleSectorLines()), rounded rectangles (DrawRectangleRounded(), DrawRectangleRoundedLines()) and also n-patch textures (DrawTextureNPatch()), detailed examples have been added to illustrate all this new functionality.

    • Experimental cubemap support, to automatically load multiple cubemap layouts (LoadTextureCubemap()). It required some internal rlgl redesign to allow cubemap textures.

    • Skeletal animation support for 3d models, this addition implied a redesign of Model data structure to accomodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also glTF models loading support has been added.

    This is a just a brief list with some of the changes of the new raylib 2.5 but there is way more, about 70 new functions have been added and several subsystems have been redesigned. More than 30 new examples have been created to show the new functionalities and better illustrate already available ones.

    It has been a long year of hard work to make raylib a solid technology to develop new products over it.

    Source code(tar.gz)
    Source code(zip)
    raylib-2.5.0-Linux-amd64.tar.gz(2.20 MB)
    raylib-2.5.0-Linux-i386.tar.gz(1.87 MB)
    raylib-2.5.0-macOS.tar.gz(3.61 MB)
    raylib-2.5.0-Win32-mingw.zip(2.27 MB)
    raylib-2.5.0-Win32-msvc15.zip(1.71 MB)
    raylib-2.5.0-Win64-mingw.zip(2.44 MB)
    raylib-2.5.0-Win64-msvc15.zip(1.75 MB)
    raylib_installer_2.5.mingw.exe(84.88 MB)
    raylib_installer_v2.5.tcc.exe(23.38 MB)
  • 2.0.0(Jul 21, 2018)

    After 9 month of hard work, here it is a new version of raylib!

    In raylib 2.0 the full API has been carefully reviewed for better consistency, some new functionality has been added and the overall raylib experience has been greatly improved... The key features of new version are:

    • Complete removal of external dependencies. Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependant ones, that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.

    • Full redesign of audio module to use the amazing mini_al audio library, along with external dependencies removal, OpenAL library has been replaced by mini_al, this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtly, the perfect low-level companion for raylib audio module!

    • Support for continuous integration building through AppVeyor and Travis CI. As a consequence, raylib GitHub develop branch has been completely removed simplyfing the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for up-to 12 different configurations, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!

    • More platforms supported and tested, including BSD family (FreeBSD, openBSD, NetBSD, DragonFly) and Linux-based family platforms (openSUSE, Debian, Ubuntu, Arch, NixOS...). raylib has already been added to some package managers! Oh, and last but not less important, Android 64bit is already supported by raylib!

    • Support for TCC compiler! Thanks to the lack of external dependencies, raylib can now be easily compiled with a minimal toolchain, like the one provide by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for runtime compilation of raylib-based code... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in just a few seconds!

    • Refactored all raylib configuration #defines into a centralized config.h header, with more than 40 possible configuration options to compile a totally customizable raylib version including only desired options like supported file-formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!

    • A part of that, lots of new features, like a brand new font rendering and packaging system for TTF fonts with SDF support (thanks to the amazing STB headers), new functions for CPU image data manipulation, new orthographic 3d camera mode, a complete review of raymath.h single-file header-only library for better consistency and performance, new examples and way, way more.

    As always, examples and templates have been reviewed to work with new version (some new examples added), all included external libraries have been updated to latest stable version and latest Notepad++ and MinGW have been configured to work with new raylib 2.0.

    raylib Windows Installer package includes the following:

    • Notepad++ 7.5.7 (32bit): Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW-w64 32bit (GCC 7.2.0): C/C++ Compiler including precompiled raylib library.
    • raylib Content: Code examples, Game samples, Project templates.

    Enjoy the brand new raylib 2.0!

    Source code(tar.gz)
    Source code(zip)
    raylib-2.0.0-Linux-amd64.tar.gz(1.87 MB)
    raylib-2.0.0-Linux-i386.tar.gz(1.77 MB)
    raylib-2.0.0-macOS.tar.gz(2.75 MB)
    raylib-2.0.0-Win32-mingw.zip(1.89 MB)
    raylib-2.0.0-Win32-msvc15.zip(1.42 MB)
    raylib-2.0.0-Win64-mingw.zip(2.00 MB)
    raylib-2.0.0-Win64-msvc15.zip(1.46 MB)
    raylib_installer_v2.0.exe(100.92 MB)
    raylib_tcc_compiler.zip(2.35 MB)
  • 1.9.4-dev(Feb 4, 2018)

  • 1.8.0(Oct 22, 2017)

    Another raylib release is published: raylib 1.8. Again, several modules of the library have been reviewed and some new functionality added. Main changes of this new release are:

    • Procedural image generation functions, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.

    • Parametric mesh generation functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.

    • PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a new complete PBR material example is also provided for reference.

    • Custom Android APK build pipeline with simple Makefile. Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.

    • rlgl module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a complete example provided. rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.

    • raymath library has been also reviewed to align with other advance math libraries like GLM. Matrix math has been improved and simplified, some new Quaternion functions have been added and Vector3 functions have been renamed all around the library for consistency with new Vector2 functionality.

    As always, examples and templates have been reviewed to work with new version (some new examples have been added), all external libraries have been updated to latest stable version and latest Notepad++ and MinGW have been configured to work with new raylib v1.8.

    For a detailed list of changes, check CHANGELOG.

    raylib Windows Installer package includes the following:

    • Notepad++ 7.5.1 (32bit): Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 5.3.0): C Compiler including raylib libraries and dependencies.
    • raylib Content: Code examples, Game samples, Project templates.

    Just enjoy learning with raylib 1.8!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.8.exe(83.30 MB)
  • 1.7.0(May 18, 2017)

    New raylib version 1.7 arrives with lots of improvements. Some highlights of this new version are:

    • More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, funtions for VR simulation and much more!
    • Support of configuration flags on every raylib module. Advance users can customize raylib just choosing desired features, defining some configuration flags on modules compilation. That way users can control library size and available functionality.
    • Improved build system for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compliation flags.
    • New examples and sample games added. All samples material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to latest raylib version and tested in multiple platforms. Examples folder structure has been improved and also build systems.
    • Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplyfied, some functions has been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation.
    • Some other features: Gamepad support on HTML5, RPI touch screen support, 32bit audio support, frames timming improvements, public log system, rres file format support, automatic GIF recording...

    For a detailed list of changes, check CHANGELOG.

    raylib Windows Installer package includes the following:

    • Notepad++ 7.4.1 (32bit): Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 5.3.0): C Compiler including raylib libraries and dependencies.
    • raylib Content: Code examples, Game samples, Project templates.

    Just enjoy learning with raylib 1.7!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.7.exe(61.12 MB)
  • 1.6.0(Nov 24, 2016)

    New raylib version 1.6 to commemorate raylib 3rd anniversary! Main features:

    • Complete raylib LUA binding. All raylib functions plus the +60 code examples have been ported to LUA, now LUA users can enjoy coding videogames in LUA while using all the internal power of raylib.
    • Completely redesigned audio module. Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming.
    • Physac module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by @victorfisac, multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
    • Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility.
    • Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads.
    • Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support.
    • Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also added a pre-configured Visual Studio C++ 2015 solution with raylib project and C/C++ examples for users that prefer that professional IDE and compiler.

    For a detailed list of changes, check CHANGELOG.

    raylib Windows Installer package includes the following:

    • Notepad++ 7.2 (32bit): Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 5.3.0): C Compiler including raylib libraries and dependencies.
    • raylib Useful Content: Code examples, Game samples, Project templates, fonts, shaders, etc.

    Just enjoy learning with raylib 1.6!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.6.exe(53.61 MB)
  • 1.5.0(Jul 19, 2016)

    New raylib version 1.5! Main features:

    • VR support: raylib supports Oculus Rift CV1 and, additionally, supports simulated VR stereo rendering, independent of the VR device.
    • New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures.
    • New lighting system with support for up to 8 configurable lights of 3 types: point, directional and spot lights.
    • Complete gamepad support on Raspberry Pi: Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
    • Redesigned physics module: physac module has been converted to header only and usage has been simplified. Performance has also been significantly improved.
    • Audio chiptunes support and mixing channels; added support for module audio music (.xm, .mod).
    • Other additions include a 2D camera system, render textures (for offline render) and support for legacy OpenGL 2.1 on desktop platforms.

    For a detailed list of changes, check CHANGELOG.

    raylib Windows Installer package includes the following:

    • Notepad++ 6.9.2: Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 4.7.2): C Compiler including raylib libraries and dependencies.
    • raylib Useful Content: Code examples, Game samples, Project templates, fonts, shaders, etc.

    Just enjoy learning with raylib 1.5!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.5.exe(43.01 MB)
  • 1.4.0(Feb 21, 2016)

    New raylib version 1.4! Main features:

    • New set of Image manipulation functions to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image.
    • Improved SpriteFonts system with support for AngelCode fonts (.fnt) and TrueType Fonts (using stb_truetype helper library).
    • New physac physics module for basic 2D physics support.
    • raymath module reviewed and converted to a header-only file for easier portability.
    • gestures module redesigned and simplified, now it can process touch events from any source, including mouse.
    • Raspberry Pi input system redesigned to better read raw inputs using generic Linux event handlers.
    • Other important improvements: raycast system for 3D picking, two simple functions for persistent data storage and an easings module for values animation.
    • Up to 8 new code examples and +10 complete game samples including some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.

    Lots of changes and improvements (view CHANGELOG for a detailed list of changes).

    raylib Windows Installer package includes the following:

    • Notepad++ 6.8.8: Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 4.7.2): C Compiler including raylib libraries and dependencies.
    • raylib Useful Content: Code examples, Game Samples, Project Templates, fonts, shaders, etc.

    Just enjoy learning with raylib!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.4.exe(33.34 MB)
  • 1.3.0(Sep 3, 2015)

    Next big raylib release! Main features of this new release:

    Shaders support: Apply shaders to your 3d models or enable postprocessing screen effects, use any of the postprocessing shaders collection included with this release or create your own (templates also included)

    Textures formats support improved: Load any kind of file and any kind of internal color format, including compressed formats (DXT, ETC, ASTC, PVRT)!

    New camera module: Ready to use camera; just enable your desired camera mode (FREE, ORBITAL, FIRST_PERSON, THIRD_PERSON).

    New gestures module: Enable gestures detection on Android an HTML5!

    raygui: A new IMGUI module intended for rapid-multisystem tools development. Still experimental but fully functional!

    Lots of changes and improvements (view CHANGELOG for a detailed list of changes).

    raylib Windows Installer package includes the following tools:

    • Notepad++ 6.8.2: Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 4.7.2): C Compiler including raylib libraries and dependencies.
    • raylib Useful Content: Code examples, Game templates, rBMF fonts, Postpro shaders, etc.

    Just enjoy learning with raylib!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.3.exe(27.17 MB)
  • 1.2.2(Jan 4, 2015)

    Next big raylib release! Added support for multiple platforms! Now raylib C code can be compiled to Windows, Linux, OSX, RaspberryPi, Android and HTML5 (emscripten).

    raylib v1.2.0 was published in September but this new v1.2.2 release corrects some bugs, improves support for multiple platforms and adds some new features (view CHANGELOG for a detailed list of changes).

    raylib Windows Installer package includes the following tools:

    • Notepad++ 6.7.2: Code editor preconfigured for raylib, including code compilation scripts.
    • MinGW (GCC 4.7.2): C Compiler including raylib libraries and dependencies.
    • raylib Useful Content: Code examples, Game templates, rBMF fonts, etc.

    Just enjoy learning with raylib!

    Source code(tar.gz)
    Source code(zip)
    raylib_installer_v1.2.2c.exe(25.29 MB)
  • 1.1.1(Aug 2, 2014)

    Complete internal redesign of the library to support OpenGL 3.3+ and OpenGL ES 2.0.

    New big module rlgl has been added to 'translate' immediate mode style functions (i.e. rlBegin(), rlVertex3f()) to GL 1.1, 3.3+ or ES2. Another new module raymath has also been added with lot of useful 3D math vector-matrix-quaternion functions.

    raylib v1.1.0 was published in April but this new v1.1.1 release implements multiple bugs corrections and some new features (view CHANGELOG for a detailed list of changes).

    One complete game has been included for reference: Dr. Turtle and Mr. Gamera.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.6(Mar 16, 2014)

    New raylib release! Some bugs fixed and multiple functions added (or reviewed).

    This will probably be the last release before the upcoming raylib v1.1 (that will be amazing :P).

    Check CHANGELOG to see how this version has evolved with bug fixes and new functions.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.4(Mar 16, 2014)

    This version has been used to teach videogames programming to my students during the course 2013-2014. Some games developed with this version can be seen on raylib facebook page.

    Along the course, raylib has been reviewed several times (since v1.0.0) to produce v1.0.4, check CHANGELOG to see how this version has evolved with bug fixes and new functions.

    Enjoy! :)

    Source code(tar.gz)
    Source code(zip)
I make videogames and tools to make videogames. I teach videogames dev. Always available for talks, conferences and master classes.
Dragon's Dice Roller aims to be a lightweight, simple, reliable and easy-to-use dice roller for RPG games.

Dragon's Dice Roller is the first and (so far the only) open source RPG dice roller written in C available on GitHub. It aims to be a lightweight, simple, reliable and easy-to-use dice roller for any kind of role-playing game.

Michael Kolesidis 10 Apr 22, 2022
GB Studio is a quick and easy to use retro adventure game creator for Game Boy available for Mac, Linux and Windows

GB Studio is a quick and easy to use retro adventure game creator for Game Boy available for Mac, Linux and Windows

Chris Maltby 6.8k Jan 8, 2023
SKR_Physics is a lightweight and easy to use 2D physics engine which is written in C++.

SKR_Physics SKR_Physics is a lightweight and easy to use 2D physics engine which is written in C++. Features Rectangle based collision system Very sim

Şükrü 0 Mar 8, 2022
Ground Engine is an easy to use Game Engine for 3D Game Development written in C++

Ground Engine is an easy to use Game Engine Framework for 3D Game Development written in C++. It's currently under development and its creation will b

 PardCode 61 Dec 14, 2022
Simple, fast, easy to get started mid-level game engine written in Zig

Alka Game engine written in zig, compatible with master branch. This engine does provide a toolset for you but generally you have to implement how the

Kiakra 23 Dec 5, 2022
Simple Directmedia Layer, 1.2 branch ... ***DEPRECATED***, please use https://github.com/libsdl-org/SDL for new projects!

DEPRECATED The 1.2 branch of SDL is deprecated. While we occasionally collect fixes in revision control, there has not been a formal release since 201

Simple Directmedia Layer 55 Jan 2, 2023
Minetest is an open source voxel game engine with easy modding and game creation

Minetest is an open source voxel game engine with easy modding and game creation

Minetest 8.3k Dec 29, 2022
Pure C math library for 2D and 3D programming

MATHC MATHC is a simple math library for 2D and 3D programming. Features Vectors (2D, 3D and 4D) (integer type and floating-point type) Quaternions Ma

Felipe da Silva 624 Dec 30, 2022
dos-like is a programming library/framework, kind of like a tiny game engin

dos-like is a programming library/framework, kind of like a tiny game engine, for writing games and programs with a similar feel to MS-DOS productions from the early 90s. But rather than writing code that would run on a real DOS machine, dos-like is about making programs which runs on modern platforms like Windows, Mac and Linux, but which attempts to recreate the look, feel, and sound of old DOS programs.

Mattias Gustavsson 818 Jan 7, 2023
A set of libraries and tools to make MSX games using the C programming language.

ubox MSX lib This is a set of libraries and tools to make MSX games using the C programming language. There are three main components: ubox: thin wrap

Juan J. Martínez 42 May 30, 2022
DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.

DOSBox Pure is a fork of DOSBox, an emulator for DOS games, built for RetroArch/Libretro aiming for simplicity and ease of use.

Bernhard Schelling 565 Dec 27, 2022
bsnes is a Super Nintendo (SNES) emulator focused on performance, features, and ease of use.

bsnes is a Super Nintendo (SNES) emulator focused on performance, features, and ease of use.

bsnes 1.3k Jan 4, 2023
A clone of the classic QBasic Gorillas written in the Zig programming language

⚡ Zig Gorillas ?? A clone of the classic QBasic Gorillas written in the Zig programming language. Take turns in throwing an exploding banana at each o

Fabio Arnold 44 Jun 18, 2022
An OpenGL Engine Written In C Using A Very OOP-Like Way Of Programming

A Simple Engine in its very first stages of becoming a, Game Engine or just a framework for making games using OpenGL. Here are the features of the Op

DevHedron 26 Jul 9, 2022
A programming game, in which your goal is to help a group of dwarves establish a small outpost in the middle of a dangerous forest.

"Since they were to come in the days of the power of Melkor, Aulë made the dwarves strong to endure. Therefore they are stone-hard, stubborn, fast in

Alexey Nikolaev 6 Sep 29, 2022
Recreation of the MineStorm game for a student programming project.

MineStorm General information This project is a student project done for ISART Digital by Rémi SERRA and Alexandre PERCHÉ. The goal was to recreate th

Rémi Serra 1 Dec 7, 2022
Engine being created for homeworks in UPC Master's Degree in Advanced Programming for AAA Video Games.

Strawhat Engine Strawhat Engine is a game engine under construction that has model loading and camera movement features along with an editor. Reposito

I. Baran Surucu 12 May 18, 2022
A minecraft clone built in c++ opengl for the purpose of prefecting graphics programming skills.

LearnOpenGL - CLion This is a project template for OpenGL development with JetBrains CLion IDE. It was created mainly for LearnOpenGL tutorials. Inclu

Jeremy Dellock 1 Dec 28, 2021
This is the source repo for the book Game Programming Patterns

Note: Now that the book is done, I'm not actively working on it. There are only so many hours in the day, and I have other projects that need my love,

Bob Nystrom 3.4k Dec 30, 2022