Setting Fixed frame rate/fixed fps

Hi, I have a problem that my game is running differently on different computers. If i know good, event tick is called every frame so if computer is faster and game is running with more fps the tick event is called more often which in my case have impact on gameplay. For example when I am playing my game and my coputer would slow down for some reason and number of fps drop down the moving actiors in game slow down so its is easier to calculate when to for example jump. I am asking if ithere is maybe a way of setting on how much fps game would run or how often tick event is called or maybe any other solution to that problem.

Hey

Regardless of how often EventTick fires, the delta time that is passed in should reflect actual time passed since the list tick event.

If you are using time passed to render your world the number or event ticks should not effect anything

If you are using the number of times the event tick fires then frame per second will effect everything

So if you use the ratio of deltaTicks to determine how much time has passed you should render world time consistently regardless of tick count

Thank you for such a fast answer :slight_smile: so, if every tick my actor moves for some units, how could I alter it to use delta seconds, if thats what are you talking about? Should i just multiply the base distance my actor should do in a tick by delta seconds and by sth like 60?

If you character moves 100 units per second you would move your character 100 * (deltaSeconds/1000) units on your EventTick event.

you divide deltaSeconds by 1000 to give you a value between 0 and 1.0

Thank you :smiley: