Update frequency on different platforms causing problems

All my screens are 60 hz but my friends screen is 144 hz and he reported that on his PC everything in the game is sped up. How do I change the update frequency dynamicly from script?

Isn’t delta time supposed to deal with this? Add * dt to your values. As I understand, delta time returns the time passed since the last frame was rendered.

That is what I though too but something seems to go wrong even if every movement is tied to delta time.

Correct. So, if you have a game object that you wish to move with 10 pixels per second to the right and you wish to do so from the update() function in your script, then this would be the correct way of achieving this:

function update(self, dt)
    local pos = go.get_position()
    pos.x = pos.x + 10 * dt
    go.set_position(pos)
end
1 Like

Try checking variable_dt in game.project:

variable_dt
Check if time step should be measured against actual time or be fixed (set to update_frequency)