Create Games for Windows, Linux and Web with Raylib C/C++
Despite having native support for C/C++, it is possible to use it in other programming languages such as: Lua, Golang, C#, Python, PHP, Java and among others.
🔊 Raylib is a library used for game development, however, there are other areas of application. Despite having native support for C/C++, it is possible to use it in other programming languages such as: Lua, Golang, C#, Python, PHP , Java and among others.
Some features of Raylib are:
- It does not have a clickable interface, it is a library for programmers who like to write code;
- Multiplatform available for: Windows, GNU/Linux, macOS, Android, HTML5 and among others;
- Written in C99 ;
- Supports 2D and 3D graphics;
- It’s easy, simple and differentiated!
Installation
Windows
- Open your browser
- Access the address: https://github.com/raysan5/raylib
- Select and click on
Releases
on the right side of the screen - Scroll down the course and download the version: raylib_installer_v4.2.mingw.exe
- After the download is finished, double-click on the file, click on Allow
- Install and Finish
- Open the shortcut: [Notepad++ for Raylib]
- As the example will already be opened, press
F6
and then press [OK] to compile
GNU/Linux
Dependencies:
For more information click here.
Installing Raylib:
Now you can remove the cloned directory:
cd ../.. && rm -rf raylib
Copy this example:
main.cpp
Compile:
Code example 2
main.cpp
Images used in the code example 2
sprite.png
bg.png
Watch the video
Note: The video is in Portuguese, but it is possible to follow the steps described in this article and the development from scratch of the code used as an example.
Comments