Lua bindings for raylib, a simple and easy-to-use library to enjoy videogames programming, with sol (www.raylib.com)
raylib-lua-sol bindings are self-contained in a header-only file: raylib-lua-sol.hpp. Just include that file in your project to allow loading and execution of raylib code written in Lua and Sol.
raylib-lua-sol could be useful for prototyping, tools development, graphic applications, embedded systems and education.
Ready to learn? Check out the code examples!
local screenWidth = 800
local screenHeight = 450
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window")
SetTargetFPS(60)
while not WindowShouldClose() do
BeginDrawing()
ClearBackground(RAYWHITE)
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY)
EndDrawing()
end
CloseWindow()
A raylib-lua-sol
CLI launcher is provided. This launcher allows you to run raylib lua programs from command line, or just with drag & drop of .lua files into raylib-lua-sol.exe.
Note that launcher can also be compiled for other platforms, just need to link with Lua, raylib and sol libraries. For more details, just check comments on sources.
bin/raylib-lua-sol examples/core_basic_window.lua
Require:
- C Compiler: MinGW(Cygwin,...) or Visual Studio.
- CMake.
sudo apt install build-essential git cmake
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
sudo dnf install alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel
raylib-lua-sol uses cmake as a primary development target. Would appreciate adding more project templates, however.
git clone https://github.com/RobLoach/raylib-lua-sol.git
cd raylib-lua-sol
git submodule update --init
cmake -B build .
cmake --build build --config Release
To run tests, use make test
...
cd build
make test
raylib-lua-sol 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.
Copyright (c) 2019 Rob Loach (@RobLoach)