LÖVR - a LÖVE-like engine for virtual reality

Discuss any ports of LÖVE to different platforms.
User avatar
bjornbytes
Prole
Posts: 12
Joined: Sat Oct 10, 2015 8:17 pm
Contact:

LÖVR - a LÖVE-like engine for virtual reality

Post by bjornbytes » Tue Oct 04, 2016 10:31 pm

This is an experimental port of LÖVE I started that is geared towards virtual reality. The main goal is to provide an alternative to some of the bigger engines when it comes to making VR games, and to allow people to use the wonderful LÖVE API to do so. I'm also using it as a fun project to learn more about engine/graphics development :). Right now the following is supported:

- Rendering to each eye of the headset automatically
- Getting pose information for the headset and controllers
- Getting input state for the Vive controllers and triggering haptic feedback
- Playing audio, spatialized using HRTFs and the headset's pose.
- 3D models with textures and normals (most 3D file formats are supported)
- 3D graphics primitives (points, lines, triangles, planes, and cubes)
- Skyboxes (equirectangular panoramas, cube maps)
- Custom shaders
- Fairly complete port of Mesh for rendering arbitrary textured geometry
- Most of the graphics state functionality with additions for 3D (3D matrix stack, depth test, backface culling)
- Filesystem IO
- Font rendering

Notably, it currently doesn't support:

- Headsets that don't support OpenVR
- Keyboard/Mouse

The project compiles on Windows/OSX with CMake and is available on Github:

https://github.com/bjornbytes/lovr
Last edited by bjornbytes on Wed Mar 15, 2017 2:12 am, edited 6 times in total.

User avatar
undef
Party member
Posts: 434
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by undef » Wed Oct 05, 2016 6:33 am

Don't have a Vive, but that's pretty cool!
How does it perform? GIFs?
twitter | steam | indieDB

Check out quadrant on Steam!

User avatar
Ulydev
Party member
Posts: 399
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by Ulydev » Wed Oct 05, 2016 8:02 am

Amazing!

User avatar
Tanner
Party member
Posts: 164
Joined: Tue Apr 10, 2012 1:51 am

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by Tanner » Wed Oct 05, 2016 9:59 am

Very cool!

User avatar
GreenWing
Prole
Posts: 2
Joined: Mon Aug 08, 2016 4:12 pm
Location: Japan
Contact:

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by GreenWing » Thu Oct 06, 2016 12:07 pm

Very exciting it!

User avatar
bjornbytes
Prole
Posts: 12
Joined: Sat Oct 10, 2015 8:17 pm
Contact:

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by bjornbytes » Sun Oct 09, 2016 4:26 am

undef wrote:Don't have a Vive, but that's pretty cool!
How does it perform? GIFs?
Here's a video with a bunch of cubes: https://twitter.com/bjornbytes/status/7 ... 2998105088

The code for that was pretty simple:

Code: Select all

function lovr.draw(eye)
  lovr.graphics.setColor(80, 0, 160)
  for x = -4, 4 do
    for y = -4, 4 do
      for z = -4, 4 do
        lovr.graphics.cube('fill', x + .5, y, z, .2)
      end
    end
  end
end
Along with a custom shader for the lighting. Each call to lovr.graphics.cube is a draw call, but I think that could be improved by using a Mesh.

Performance seems pretty good so far. Most drawing operations are just drawing a VBO with a handful of vertices, although everything is rendered twice (once for each eye). There are a lot of smaller optimizations I'd like to make, but right now I'm focusing more on getting additional functionality done.

User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by Ranguna259 » Wed Nov 02, 2016 1:44 pm

Awesome !
Any thoughts on model animations ?
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.

User avatar
kicknbritt
Prole
Posts: 41
Joined: Sat May 30, 2015 2:15 am
Location: Chicago, IL

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by kicknbritt » Wed Nov 02, 2016 3:48 pm

O_O omg this is really cool! keep it up!
"I AM THE ARBITER!!!" *Pulls out Energy sword and kills everything*

User avatar
D0NM
Party member
Posts: 158
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by D0NM » Mon Nov 07, 2016 6:30 am

Well... at least we can add
some Nintendo 3DS depth effect into 2d games ^__^
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Follow @Zabuyaki.
Twitter @FaMeSoft / GP32 Free Platformer: SUPER PLUSHA
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

User avatar
raidho36
Party member
Posts: 1512
Joined: Mon Jun 17, 2013 12:00 pm

Re: LÖVR - a LÖVE-like engine for virtual reality

Post by raidho36 » Mon Nov 07, 2016 7:26 am

But why didn't you use existing framework and patch it to work in 3d and VR?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest