LunaRay is a game framework powered by Raylib, Lua, and other useful libraries.
LunaRay aims to provide sufficient capability for creating commercial games wrapped in an easy-to-use Lua API.
- Single binary: don't worry about shared library dependencies, just deploy a single executable
- Cross platform: Windows, macOS, Linux, and Web
- Write your games in Lua
- Leverage Raylib for 2D and 3D graphics
- Leverage PhysFS for virtual filesystem operations
- Sandboxed environment
- Hot reload
- CMake 3.15 or higher
- C++11 compatible compiler
- Git
# Clone the repository
git clone <your-repo-url>
cd LunaRay
# Initialize submodules
# (No submodules needed; thirdparty deps are vendored)
# Build
mkdir build
cd build
cmake ..
cmake --build . -j8# Run with default script (main.lua)
./build/game
# Run with custom script
./build/game --script path/to/script.lua
# Run with interactive REPL
./build/game --interactive
# Enable hot reload
./build/game --hot-reloadlocal rl = require("raylib")
rl.InitWindow(800, 600, "Hello Raylib!")
while not rl.WindowShouldClose() do
rl.BeginDrawing()
rl.ClearBackground(30, 30, 30, 255)
rl.DrawText("Hello from Lua!", 300, 280, 20, 200, 200, 200, 255)
rl.EndDrawing()
end
rl.CloseWindow()Project is in active development.
See LICENSE file for details.