Game Development Reference
In-Depth Information
Application Settings - conf.lua
LÖVE allows you to configure the settings for the application. To do so, you need a conf.lua file and
it has to contain a love.conf function. If the conf.lua file is present, it is run before main.lua is.
We can create an application window of any size we choose. This example sets the application to a
mobile-app screen size of 320×480 (see Figure 11-10 ).
function love.conf(t)
t.screen.width = 320
t.screen.height = 480
t.title = "iPhone3"
t.author = "Jayant C Varma"
Figure 11-10. Running the application with mobile-app dimensions
Some of the other settings that can be added to the love.conf function are t.screen.fullscreen
which can be either true or false .
You can also use the module settings to enable or disable certain modules. Here are some
examples:
t.modules.joystick =false
t.modules.keyboard = true
t.modules.event = true
t.modules.physics = false
 
Search WWH ::




Custom Search