Laggy keyboard movement
Posted: Sun Jun 03, 2012 9:38 am
When making a graphic move across the screen with frame rate independent movement with
The movement of the graphic appears to have inconsistent lag, but when moving a graphic across the screen with the typical
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!
Code: Select all
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
Code: Select all
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
Excluding that minor hiccup, the love framework is looking really awesome, I can't wait to make my ninjas vs civil war soldiers game!