Skip to content

LunaRay

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.

Features

  • 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

Building

Prerequisites

  • CMake 3.15 or higher
  • C++11 compatible compiler
  • Git

Clone and Build

# 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

Running

# 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-reload

Example

local 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()

Current Status

Project is in active development.

License

See LICENSE file for details.

About

LunaRay - Lua meets Raylib, Physfs, and more!

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages