However, I made a .rar which contains "menubg.jpeg", "bgmusic.ogg" and "main.lua". Then I named the .rar as "game.love", however, when I launch it, the pink piggy "game" starts up. How can I start up my own project?
This is whats inside main.lua:
Code: Select all
function love.load()
pjface = love.graphics.newImage("menubg.jpeg")
x = 50
y = 50
end
function love.draw()
love.graphics.draw(pjface, x, y)
end
function love.update(dt)
if love.keyboard.isDown("down") then -- reduce the value
love.graphics.print("down")
end
if love.keyboard.isDown("up") then -- increase the value
love.graphics.print("up")
end
end
bgm = love.audio.newSource("bgmusic.ogg", "stream")
love.audio.play(bgm)