The lovr.conf callback lets you configure default settings for LÖVR. It is called once right before the game starts. Make sure you put lovr.conf in a file called conf.lua, a special file that's loaded before the rest of the framework initializes.

function lovr.conf(t)
  -- your code here


ttableThe table to edit the configuration settings on.
.identitystringA unique label for this project.
.headsettableConfiguration for the headset.
.driverstableAn ordered list of preferred headset drivers.
.mirrorbooleanWhether the desktop window should display a mirror of what's in the headset.
.msaanumberThe amount of antialiasing to use when rendering to the headset.
.offsetnumberThe vertical offset for seated experiences.
.modulestableThe set of enabled modules to use.
.audiobooleanWhether the audio module should be enabled.
.databooleanWhether the data module should be enabled.
.eventbooleanWhether the event module should be enabled.
.filesystembooleanWhether the filesystem module should be enabled.
.graphicsbooleanWhether the graphics module should be enabled.
.headsetbooleanWhether the headset module should be enabled.
.mathbooleanWhether the math module should be enabled.
.physicsbooleanWhether the physics module should be enabled.
.threadbooleanWhether the thread module should be enabled.
.timerbooleanWhether the timer module should be enabled.
.gammacorrectbooleanWhether colors are gamma corrected.
.windowtableConfiguration for the window.
.widthnumberThe width of the window.
.heightnumberThe height of the window.
.fullscreenbooleanWhether the window is fullscreen.
.msaanumberThe number of antialiasing samples to use.
.titlestringThe window title.
.iconstringThe path to the window icon file.




Disabling the headset module can improve startup time a lot if you aren't intending to use lovr.headset.

You can set t.window to nil to avoid creating the window. You can do it yourself later by using lovr.graphics.createWindow.

If the lovr.graphics module is disabled or the window isn't created, attempting to use any functionality requiring graphics may cause a crash.

The headset.offset field is a vertical offset applied to the scene for headsets that do not center their tracking origin on the floor. This can be thought of as a "default user height". Setting this offset makes it easier to design experiences that work in both seated and standing VR configurations.


A noop conf.lua that sets all configuration settings to their defaults:

function lovr.conf(t)

  -- Set the project identity
  t.identity = 'default'

  -- Headset settings
  t.headset.drivers = { 'openvr', 'webvr', 'fake' }
  t.headset.mirror = true
  t.headset.msaa = 4
  t.headset.offset = 1.7

  -- Enable or disable different modules
  t.modules.audio = true
  t.modules.data = true
  t.modules.event = true
  t.modules.graphics = true
  t.modules.headset = true
  t.modules.math = true
  t.modules.physics = true
  t.modules.thread = true
  t.modules.timer = true

  -- Configure gamma correction
  t.gammacorrect = false

  -- Configure the desktop window
  t.window.width = 1080
  t.window.height = 600
  t.window.fullscreen = false
  t.window.msaa = 0
  t.window.title = 'LÖVR'
  t.window.icon = nil

See also