local bg = love.graphics.newImage("background01.jpg")
love.graphics.draw(bg,0,0,0,love.graphics.getWidth() / bg:getWidth(),love.graphics.getHeight() / bg:getHeight(),0,0)
the game have less then 10 fps. Any ideas how to fix that?
About the filesystem: I already know how to write and read files, but i need somehow write files into the root folder of a .love/.exe (or even into the .love/.exe file) and i have no idea how to do that. Can anyone help me?
function love.load()
bg = love.graphics.newImage("background01.jpg")
end
function love.draw()
love.graphics.draw(bg,0,0,0,love.graphics.getWidth() / bg:getWidth(),love.graphics.getHeight() / bg:getHeight(),0,0)
end
Robotboy655 wrote:About the filesystem: I already know how to write and read files, but i need somehow write files into the root folder of a .love/.exe (or even into the .love/.exe file) and i have no idea how to do that. Can anyone help me?
That is not possible, and will never be (I think)... If you can explain what you're using it for I should be able to find another way of doing it though
Thank you! No lag now
About the filesystem: I want to create a config file, where i will save the screen resolution, and other stuff, to carry it over sessions.
Robotboy655 wrote:Thank you! No lag now
About the filesystem: I want to create a config file, where i will save the screen resolution, and other stuff, to carry it over sessions.
Saving to conf.lua should work, I think. If not, just say t.screen = false in conf.lua, and do a setMode() with values loaded from your config file in love.load().
Löve is sandboxed. i.e. it has access to the filesystem in a limited fashion so as to not allow destruction of important system files. By giving each game its own subfolder to play around in, it can create and destroy files on a whim without causing problems. Sadly since the sandbox is saved per user, you will not be able to save sessions across users. i.e. save files that all users can access. The other users will have to create the files again for each one when they run the game.