LeNitrous, you have to make sure "dt" is used correctly if you expect the same behavior across different machines.
Start with something simple like:
Code: Select all
local elapsed = 0
function love.update(dt)
elapsed = elapsed + dt -- track elapsed time
end
function love.draw()
love.graphics.origin()
love.graphics.rotate(elapsed/math.pi) -- 180 degrees per second
love.graphics.rectangle('fill', 0, 0, 100, 10) -- draw a rotated rectangle
end
This should give you an example of how to produce consistent rotation based on the value of "dt".
Another approach is to use a "fixed" time step but that's a little harder to understand and implement.
Also, note that "optimization" means something different in programming terminology and has nothing to do with your question.
