Buddy4point0 wrote:nevon wrote:Any reason you're redefining love.run?
I don't know! I'm new to love, can you explain what the benefits are of redefining it and not redefining it?
Redefining love.run gives you more control over the main loop (updating, user input, drawing, etc.) but I'd say it's completely unnecessary for 99% of all Lövers. Most people simply use some variation of:
Code: Select all
function love.load()
--initializing stuff
end
function love.update(dt)
--Updating said stuff
end
function love.draw()
--Drawing stuff
end
function love.mousereleased(x,y,button)
--processing mouse clicks
end
function love.keyreleased(key, unicode)
--processing key presses
end
There are other callbacks as well, such as love.focus, love.mousepressed, love.keypressed, love.joystickpressed, love.joystickreleased and love.quit, but the point is that Löve already provides you with a game loop (love.run), so unless you have a good reason to change that, you probably shouldn't.
EDIT: Argh! Ninja'd by Kikito.