My other question is: In my previous game the player have a option to change the graphics quality. I made this function to make the image quality lower:
Code: Select all
lg = love.graphics
-- This function is called for every loaded image
-- "lowgraphics" is the quality level, the higher is the number, the lower is the quality
function resizeImage(image)
local iw, ih = image:getDimensions()
local resized = lg.newCanvas(iw/div, ih/div)
lg.setCanvas(resized)
lg.clear()
lg.origin()
lg.draw(image,0,0,0,1/lowgraphics)
lg.setCanvas()
image:release()
return resized
end
-- And for drawing
lg.draw(image, 0, 0, 0, lowgraphics)