Lua Virtual Reality Engine
Go to file
bjorn b3447f4af7 Improve CMakeLists.txt; 2016-10-04 14:47:48 -07:00
doc Fix typos; 2016-10-04 12:16:49 -07:00
src Start Model; Reorganize constructors; 2016-10-03 21:54:27 -07:00
.gitignore Separate Lua API; 2016-08-09 23:28:17 -07:00
CMakeLists.txt Improve CMakeLists.txt; 2016-10-04 14:47:48 -07:00
README.md Some documentation; 2016-10-04 12:10:25 -07:00

README.md

LÖVR

LÖVR lets you make VR games with Lua!

Example

In a folder called myGame, create a file called main.lua with this in it:

function lovr.update(dt)
  t = (t or 0) + dt
end

function lovr.draw(eye)
  local x, y, z = 0, .25, -2
  local size = 1
  local angle, rx, ry, rz = t * 2, 0, 1, 0

  lovr.graphics.setColor(128, 0, 255)
  lovr.graphics.cube('line', x, y, z, size, angle, rx, ry, rz)
end

Drag the myGame folder onto a shortcut to lovr.exe. You should see a spinning purple cube! See instructions below on compiling lovr.exe.

Documentation

Some rough reference documentation exists in API.md.

Supported Hardware

  • HTC Vive

Support for other hardware will happen eventually.

Compiling

Dependencies

  • LuaJIT
  • GLFW (3.2+) and OpenGL (3.2+)
  • assimp
  • SteamVR (OpenVR)

Windows (CMake)

cd lovr
git clone --recursive https://github.com/bjornbytes/lovr-deps deps

Next, build using the CMake GUI or using the CMake command line.

mkdir build
cd build
cmake ..

This should output a Visual Studio solution, which can be built using Visual Studio. Or you can just build it with CMake:

cmake --build .

The executable will then exist at /path/to/lovr/build/Debug/lovr.exe. The recommended way to create and run a game from this point is:

  • Create a shortcut to the lovr.exe executable somewhere convenient.
  • Create a folder for your game: MySuperAwesomeGame.
  • Create a main.lua file in the folder and put your code in there.
  • Drag the MySuperAwesomeGame folder onto the shortcut to lovr.exe.

OSX (tup)

Used for development, not generally recommended.

One-time setup:

cd lovr
git clone git@github.com:ValveSoftware/openvr ..
export DYLD_LIBRARY_PATH=`pwd`/../openvr/lib/osx32
brew install assimp glfw3 luajit

Compiling:

tup

Running a game:

$ ./lovr /path/to/game