Skip to content

megagrump/yuema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yuema

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.

yuema1

yuema2

yuema3

yuema_box2d

Work in progress!

The API is not stable and will change frequently.

How to build

Make sure you clone with submodules:

git clone --recurse-submodules git@github.com:megagrump/yuema.git

Linux

1. Install dependencies

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.

2. Build

mkdir build
cd build
cmake ..
make

Windows

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

Other platforms/compilers

No one has tried yet.

Examples

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.

How to make your own game with yuema

You currently have to manually bootstrap new projects, but it's simple:

  1. Build yuema or download a binary release.
  2. Create a new directory for your project, for example /home/alice/myproject or C:\projects\myproject.
  3. Copy the yuema executable (yuema or yuema.exe on Windows) to the project directory and rename it, for example myproject (or myproject.exe).
  4. Copy the lib directory to the project directory.
  5. Create a main.lua or main.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.

Code and libraries used in this project