Raylib
{{short description|Game programming library}}
{{Advert|date=September 2020}}
{{DISPLAYTITLE:raylib}}
{{Infobox software
| name = raylib
| logo = File:Raylib logo.png
| logo caption =
| screenshot =
| screenshot size =
| screenshot alt =
| caption =
| collapsible =
| author =
| developer = Ramon Santamaria and contributors
| released = {{Start date and age|2013|11|18}}
| discontinued =
| latest release version = 5.5.0
| latest release date = {{Start date and age|2024|11|18}}
| latest preview version =
| latest preview date =
| repo = {{URL|https://github.com/raysan5/raylib}}
| programming language = C, specifically C99
| operating system =
| platform = Windows, Linux, macOS, FreeBSD, Android, Raspberry Pi, HTML5
| included with =
| size =
| language =
| language count =
| language footnote =
| genre = API
| license = zlib License{{cite web |title=License |url=https://www.raylib.com/license.html}}{{Cite web | url=https://github.com/raysan5/raylib/blob/master/LICENSE | title=Raylib GitHub| website=GitHub| date=10 October 2021}}
| alexa =
| website = {{URL|www.raylib.com}}
| standard =
| AsOf =
}}
Raylib (stylized as raylib) is a cross-platform open-source software development library. The library was made to create graphical applications and games.{{Cite web|last=Thomas|date=2019-08-01|title=Best 2D Game Engines: The Complete List (2020)|url=https://thomasgervraud.com/best-2d-game-engine/|access-date=2020-07-20|website=Thomas Gervraud|language=en-US}}{{Cite web|title=A Snake Game Written in PHP (with Raylib)|url=https://thephp.website/en/issue/games-with-php|access-date=2020-07-20|website=thephp.website|date=12 April 2020 |language=en}}
The library is designed to be suited for prototyping, tooling, graphical applications, embedded systems, and education. The source code is written in C (C99), which is distributed under a zlib/libpng OSI certified open-source license. It supports compilation to several target platforms, including Windows, Linux, macOS, FreeBSD, Android, Raspberry Pi and HTML5.
raylib has been ported to more than 70 programming languages in the form of bindings,[https://github.com/raysan5/raylib/blob/master/BINDINGS.md BINDINGS.md file] but many of these ports are not stable.{{Cite web|title=raysan5/raylib|url=https://github.com/raysan5/raylib|access-date=2020-07-15|website=GitHub|language=en}}
History
{{Refimprove-section|date=September 2023}}
raylib development was started in August 2013 by Ramon Santamaria to support a game development course, focused on students with no previous coding experience and artistic profile. During the course, raylib was further developed based on the feedback of the students and by June 2014, the library was starting to be showcased in several game development events in Barcelona.
raylib 1.0 was released in November 2013 and it featured around 80 functions for window and inputs management, basic 2D and 3D shape drawing, texture loading and drawing, font loading, text drawing, audio system management and audio file loading and playback. The first raylib version had eight subsequent minor releases (from raylib 1.1 to raylib 1.8), over the course of five years, which each introduced some new features. Some of the most notable improvements were Android, WebAssembly and Raspberry Pi support, multiple OpenGL backends, VR support and ten examples.
raylib 2.0 was released in July 2018 and removed all external dependencies from the build system. It also exposed a number of configuration options in the build system, to minimize size and increase support, supporting various continuous integration systems. Along the following two years, parts of the library were reviewed updated, and the ecosystem was built out. During this period, a single minor release, raylib 2.5, was launched.
raylib 3.0 was released in April 2020, refactoring many parts of the code to improve portability and bindings. It involved moving global variables to contexts, added support for custom memory allocators, a filesystem for loading assets and over 115 code examples. It received a minor update, raylib 3.5, in December 2020.
raylib 4.0 was released in November 2021, featuring a complete naming review for library consistency and coherency: function names, parameters, descriptions, comments and log output messages were reviewed. It added an internal Events Automation System and exposed game-loop control for the user. It also features some of its internal libraries to be used as standalone modules: rlgl and raymath.
raylib 4.2 was released in August 2022.{{cite web |title=HISTORY.md File |url=https://github.com/raysan5/raylib/blob/master/HISTORY.md |website=www.github.com |publisher=11 August 2022 |access-date=15 October 2022}}
raylib 4.5 was released in March 2023, 7 months after the last release. This update brought ANGLE support on Desktop platforms, a brand new camera module, support for M3D models and M3D/GLTF animations, compatibility with the [https://qoaformat.org/ QOA audio file format], a brand new module for compressed textures loading ([https://github.com/raysan5/raylib/blob/master/src/external/rl_gputex.h rl_gputex]), reviews in the [https://github.com/raysan5/raylib/blob/master/src/rlgl.h rlgl] and the [https://github.com/raysan5/raylib/blob/master/src/rshapes.c rshapes] modules, data structures validation (IsImageReady()
, IsTextureReady()
and IsSoundReady()
) for many raylib structures and many other improvements. It has been the biggest update of the library to date.
raylib 5.0 was released in November 2023, improving support for future platform ports.{{Cite web|url=https://wololo.net/2023/12/01/release-raylib-5-0-for-ps4-ps-vita/|title=Release: Raylib 5.0 for PS4 & PS Vita|author=Wololo|date=1 December 2023|access-date=15 January 2024}}
raylib 5.5 was released in November 2024.
Features
raylib offers the following features:{{Cite web|title=raylib–A C++ Game Library Perfect For Beginners|url=https://www.gamefromscratch.com/post/2016/07/24/raylib-game-lib-for-beginners.aspx|access-date=2020-07-20|website=www.gamefromscratch.com|date=24 July 2016}}{{Cite web|title=Raylib 2.5 Released|url=https://www.gamefromscratch.com/post/2019/06/03/Raylib-25-Released.aspx|access-date=2020-07-20|website=www.gamefromscratch.com|date=3 June 2019}}
- Support for multiple platforms, including Windows, Linux, macOS, Raspberry Pi Android and HTML5
- Support for OpenGL 1.1, 2.1, 3.3, 4.3 and OpenGL ES 2.0, 3.0 as graphic API
- Image, textures and fonts loading and drawing from several formats
- Audio loading and playing from several formats and streaming support
- Math operations for vectors, matrices, and quaternions
- 2D rendering with a camera, including automatic sprites batching
- 3D models rendering including custom shaders and postprocessing shaders
- Support for VR simulations with configurable HMD device parameters
- Support for animated as well as non-animated 3D and 2D models
Reception and adoption
{{As of|2024|January|post=,}} GitHub lists around 900 projects matching the raylib
topic.{{Cite web|url=https://github.com/topics/raylib|title=raylib · GitHub Topics|website=GitHub |access-date=15 January 2024}}
Software architecture
=Modules=
File:Raylib architecture v5.0.png
raylib consists of several modules that are exposed to the programmer through the API.
- core – Handles the window creation and OpenGL context initialization as well as inputs management (keyboard, mouse, gamepad and touch input)
- rlgl – Handles OpenGL backend, abstracting multiple versions to a common API. This module can be used standalone.
- shapes – Handles basic 2D shape rendering (line, rectangle, circle...) and basic collision detection
- textures – Handles image and texture loading (CPU and GPU) and management, including image manipulation functionality (crop, scale, tint, etc.)
- text – Handles fonts loading as spritesheet and text rendering. Also includes some text processing functionality (join, split, replace, etc.)
- models – Handles 3D model loading and rendering, including support for animated models
- raudio – Handles audio device management and audio file loading and playback, including streaming support. This module can be used standalone.
- raymath – Provides a set of math functions for vectors, matrices and quaternions
=Bindings=
raylib has bindings for more than 70 different programming languages, created by various language communities. Computer programming languages that are updated to the latest version include: C#, Crystal, D (Dlang), Fortran, Go, Jai, Java, Lua, Nim, Python, Rust, V (Vlang), and Zig. A list of bindings is available in the BINDINGS.md file in the raylib GitHub repository.
=Add-ons=
The raylib community has contributed several add-ons to extend the features and connection of raylib with other libraries. Some of the modules are:
- raygui – Immediate mode GUI module for raylib{{Citation|last=Ray|title=raysan5/raygui|date=2020-07-15|url=https://github.com/raysan5/raygui|access-date=2020-07-15}}
- physac – physics module intended to be used with raylib{{Citation|last=Fisac|first=Víctor|title=victorfisac/Physac|date=2020-07-14|url=https://github.com/victorfisac/Physac|access-date=2020-07-15}}
- libpartikel – particle system module for raylib{{Citation|last=Briemann|first=David Linus|title=dbriemann/libpartikel|date=2020-06-10|url=https://github.com/dbriemann/libpartikel|access-date=2020-07-15}}
- spine-raylib – Spine animations integration module for raylib{{Citation|last=WEREMSOFT|title=WEREMSOFT/spine-raylib-runtimes|date=2020-06-27|url=https://github.com/WEREMSOFT/spine-raylib-runtimes|access-date=2020-07-15}}
- cimgui-raylib – Dear Imgui integration module for raylib{{Citation|last=WEREMSOFT|title=WEREMSOFT/c99-raylib-cimgui-template|date=2020-07-12|url=https://github.com/WEREMSOFT/c99-raylib-cimgui-template|access-date=2020-07-15}}
Awards
- In April 2019, Santamaria was awarded with the Google Open Source Peer Bonus award for contributing to the open-source ecosystem with raylib.{{Cite web|title=Google Open Source Peer Bonus winners are here!|url=https://opensource.googleblog.com/2019/04/google-open-source-peer-bonus-winners.html|access-date=2020-07-15|website=Google Open Source Blog}}
- In August 2020, raylib was awarded with an Epic MegaGrant by Epic Games to support its development.{{Cite web|date=2020-08-07|title=rayLib receives an Epic MegaGrant|url=https://gamefromscratch.com/raylib-receives-an-epic-megagrant/|access-date=2020-08-10|website=GameFromScratch.com|language=en-US}}
- In April 2021, Santamaria was awarded with another Google Open Source Peer Bonus award for the same reasons.{{Cite web|title=Announcing the First Group of Google Open Source Peer Bonus winners in 2021!|url=https://opensource.googleblog.com/2021/04/announcing-first-group-of-google-open-source-peer-bonus-winners.html|access-date=2021-04-27|website=Google Open Source Blog}}
- In March 2022, raylib was nominated for the Best Game Engine category on Mobile Games Awards 2022.{{Cite web|title=MOBILE GAMES AWARD - The Finalists for 2022|url=https://www.mobilegamesawards.com/the-finalists-for-2022|access-date=2022-03-20|website=MOBILE GAME AWARDS}}
See also
References
External links
- {{Official website|https://www.raylib.com}}
- {{Github|raysan5/raylib|raylib}}
- [https://itch.io/games/made-with-raylib raylib games on Itch.io]
{{Video game engines}}
Category:Application programming interfaces
Category:C (programming language) libraries
Category:Cross-platform software
Category:Video game development