Yuema is a Lua-based programming framework combining raylib (and some of its accompanying libraries), Box2D, LuaJIT and Yuescript into a stand-alone executable with minimal external dependencies.
You can use it to write 2D and 3D games in Lua or Yuescript, a MoonScript derivative that compiles to Lua. Yuescript integration is seamless with no extra compilation step required.
The API is not stable and will change frequently.
Make sure you clone with submodules:
git clone --recurse-submodules [email protected]:megagrump/yuema.git
Debian based (Ubuntu, etc.)
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
RedHat based (Fedora, etc.)
sudo dnf install alsa-lib-devel mesa-libGL-devel libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel
CMake is required also.
mkdir build
cd build
cmake ..
make
The MSYS MinGW compiler suite is used to create binaries for Windows. Additionally, mingw-w64-x86_64-cmake
is required to build the project.
The /mingw64/bin
directory is expected to be in your $PATH
.
mkdir build
cd build
cmake -G "MSYS Makefiles" ..
make
No one has tried yet.
Some examples can be found in the examples
directory.
./build/yuema examples/gui_controls.yue
./build/yuema examples/core_3d_camera_first_person.yue
./build/yuema examples/models_mesh_picking.yue
./build/yuema examples/box2d_joints.yue
You must run the examples from the project root.
You currently have to manually bootstrap new projects, but it's simple:
- Build yuema or download a binary release.
- Create a new directory for your project, for example
/home/alice/myproject
orC:\projects\myproject
. - Copy the yuema executable (
yuema
oryuema.exe
on Windows) to the project directory and rename it, for examplemyproject
(ormyproject.exe
). - Copy the
lib
directory to the project directory. - Create a
main.lua
ormain.yue
file in the project directory. This is your project's entry point.
myproject <-- project directory
/lib <-- library code
main.yue <-- code entry point
myproject(.exe) <-- executable
You can run your project by starting myproject
from the project directory.
- raylib: https://github.com/raysan5/raylib Copyright (c) 2013-2022 Ramon Santamaria
- raygui: https://github.com/raysan5/raygui Copyright (c) 2014-2022 Ramon Santamaria
- Box2D: https://github.com/erincatto/box2d Copyright (c) 2019 Erin Catto
- LuaJIT: https://github.com/LuaJIT/LuaJIT Copyright (C) 2005-2022 Mike Pall
- Yuescript: https://github.com/pigpigyyy/Yuescript Copyright (c) 2021 Li Jin
- luautf8: https://github.com/starwing/luautf8 Copyright (c) 2018 Xavier Wang
- CParser: https://github.com/facebookresearch/CParser Copyright (c) Facebook, Inc. and its affiliates.