LOVE window problems
Posted: Fri Dec 01, 2017 1:15 pm
So I just made this moving cube thing with this code :
function love.load()
x = 0
end
function love.update(dt)
if love.keyboard.isDown("right") then
x = x + 1
end
end
function love.draw()
love.graphics.rectangle("fill", x, 10, 100, 100)
end
It's supposed to work fine, but whenever I press the right or left key nothing happens, but if I press one of the keys and then move the program's window the cube is in another position(also when I open the program without running a game there is only a still image not an animation), I do believe this is a compatibility problem, does anyone have an idea of how to fix this?(I have Windows 10 64 bits)
function love.load()
x = 0
end
function love.update(dt)
if love.keyboard.isDown("right") then
x = x + 1
end
end
function love.draw()
love.graphics.rectangle("fill", x, 10, 100, 100)
end
It's supposed to work fine, but whenever I press the right or left key nothing happens, but if I press one of the keys and then move the program's window the cube is in another position(also when I open the program without running a game there is only a still image not an animation), I do believe this is a compatibility problem, does anyone have an idea of how to fix this?(I have Windows 10 64 bits)