love.conf not working?
Posted: Sat Mar 04, 2023 12:37 pm
Hi everyone, so I have a conf.lua file where I put my love.conf function in. But when I require the file in main.lua, everything I wrote inside conf.lua seems to be ignored. I'm not sure why. Here is my file structure:
And here is the code inside conf.lua and main.lua respectively:
Any help is appreciated!
And here is the code inside conf.lua and main.lua respectively:
Code: Select all
-- Code in conf.lua
function love.conf(t)
t.window.with = 1280
t.window.height = 720
end
Code: Select all
-- Code in main.lua
function love.load()
require("Conf.conf")
require("Objects.mainCharacter")
require("Objects.rect")
require("Objects.floor")
love.window.setTitle("Object Follow Test")
end
function love.update(dt)
mainCharacter:update(dt)
rect:update()
floor:update()
end
function love.draw()
mainCharacter:draw()
rect:draw()
floor:draw()
end