1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00
lovr/README.md

70 lines
1.1 KiB
Markdown
Raw Normal View History

2016-07-10 23:25:40 +00:00
LÖVR
2016-08-01 00:47:28 +00:00
===
2016-07-10 23:25:40 +00:00
2016-07-17 07:44:35 +00:00
LÖVR is a framework for making VR games with Lua! Inspired heavily by [LÖVE](http://love2d.org). Still under heavy development.
2016-08-01 00:47:28 +00:00
Example
---
In a directory called `myGame`, create a file called `main.lua`:
2016-08-01 00:48:08 +00:00
```lua
2016-08-01 00:47:28 +00:00
function lovr.update(dt)
2016-08-10 06:42:30 +00:00
print(lovr.headset.getPosition())
2016-08-01 00:47:28 +00:00
end
```
2016-09-17 03:18:53 +00:00
Then, run your game:
2016-08-01 00:47:28 +00:00
2016-08-01 00:48:08 +00:00
```sh
2016-09-17 03:18:53 +00:00
$ lovr path/to/myGame
2016-08-01 00:47:28 +00:00
```
Dependencies
---
- LuaJIT
2016-08-10 06:45:33 +00:00
- GLFW (3.2+) and OpenGL (3.2+)
2016-08-01 00:47:28 +00:00
- assimp
2016-09-17 03:18:53 +00:00
- SteamVR (OpenVR)
2016-08-01 00:47:28 +00:00
2016-08-10 06:42:30 +00:00
Compiling
2016-08-01 00:47:28 +00:00
---
2016-08-10 08:18:45 +00:00
### Windows (CMake)
2016-08-10 08:20:05 +00:00
- Install [lovr-deps](https://github.com/bjornbytes/lovr-deps):
2016-08-10 08:18:45 +00:00
```sh
2016-08-10 08:20:05 +00:00
cd lovr
git clone --recursive https://github.com/bjornbytes/lovr-deps deps
2016-08-10 08:18:45 +00:00
```
2016-09-17 03:18:53 +00:00
Next, build using the CMake GUI or using the CMake command line.
2016-08-10 06:42:30 +00:00
2016-08-01 00:48:08 +00:00
```sh
2016-08-01 00:47:28 +00:00
mkdir build
cd build
2016-09-17 03:18:53 +00:00
cmake ..
2016-08-10 08:18:45 +00:00
```
This should output a Visual Studio solution, which can be built using Visual Studio or by using CMake:
```sh
cmake --build .
2016-08-01 00:47:28 +00:00
```
2016-08-10 06:42:30 +00:00
2016-09-17 03:18:53 +00:00
The executable will then exist at `/path/to/lovr/build/Debug`.
2016-08-10 08:18:45 +00:00
### OSX (tup)
2016-08-10 06:42:30 +00:00
2016-09-17 03:18:53 +00:00
Used for development, not generally recommended.
2016-08-10 06:42:30 +00:00
```sh
2016-09-17 03:18:53 +00:00
cd lovr
git clone git@github.com:ValveSoftware/openvr ..
export DYLD_LIBRARY_PATH=`pwd`/../openvr/lib/osx32
brew install assimp glfw3 luajit
2016-08-10 06:42:30 +00:00
tup
```