The simple and easy-to-use library to enjoy videogames programming written in the zippy LuaJIT implementation of the popular scripting language Lua
DISCLAIMER: THIS IS NOT A STABLE RELEASE AND IS HIGHLY PRONE TO BUGS. USE WITH CAUTION.
- Everything that raylib 5.0 has (except for rlgl, which WILL come in an upcoming update to this binding)
- Auto-detection of OS and raylib binary
- One-script library
- Automatic memory management for certain functions
- Simply build raylib from source as a shared library and place it in the same directory. That's it, since LuaJIT's FFI will automatically load functions for you.
package.path = "./?.lua;./?.ljbc;./?.out" -- Optional: Set package paths to avoid conflicting with LuaRocks packages if you have LuaRocks installed
local rl = require("raylib")
rl.InitWindow(800, 600, "raylib [core] example - basic window")
while not rl.WindowShouldClose() do
rl.BeginDrawing()
rl.ClearBackground(rl.RAYWHITE)
rl.DrawText("Congrats! You created your first window!", 190, 200, 20, rl.LIGHTGRAY)
rl.EndDrawing()
end
rl.CloseWindow()