if love.keyboard.isDown("w") then
y = y - 200 * dt --dt is the delta time
end
if love.keyboard.isDown("a") then
x = x - 200 * dt
end
if love.keyboard.isDown("s") then
y = y + 200 * dt
end
if love.keyboard.isDown("d") then
x = x + 200 * dt
end
The movement of the graphic appears to have inconsistent lag, but when moving a graphic across the screen with the typical
if love.keyboard.isDown("w") then
y = y - 5
end
if love.keyboard.isDown("a") then
x = x - 5
end
if love.keyboard.isDown("s") then
y = y + 5
end
if love.keyboard.isDown("d") then
x = x + 5
end
The movement is totally smooth, is it something to do with the delta-time being inaccurate on 32 bit machines or something?
Excluding that minor hiccup, the love framework is looking really awesome, I can't wait to make my ninjas vs civil war soldiers game!
at the end of the update function, must be something wrong with the love framework, the lag is very noticeable on my crappy windows xp os, oh well I'll just stick with the good ol' simple way.
That's not what I meant, because that will make movement incorrect, you need to round (down) what you pass to love.graphics.draw, not what you manipulate.