Deltatime mean framerate independant right?

Discussion and feedback on Construct 2

Post » Fri Sep 02, 2016 1:18 pm

Hi guys,

I'm wondering if some of you noticed the same problem than me on some machines.

I'm using "Every X seconds" condition and sometime "Timers" and 1 second is often longer than 1 second on a lot of PCs with a Windows version inferior to 7.

Is there any workaround to this? I'm right when I say that "Every X seconds" AND Timers Behaviors use deltatime already so it should be framerate independent? I noticed that the users for wich the game duration are longer than it should be have low fps in the game, like 10-15, but even there I was sure it was enough for timers to stay ok, it's not like the game was less than 1 or 2 fps.

Thanks.
I made 2 games so far: www.ID-Games.net
B
11
S
2
Posts: 54
Reputation: 1,403

Post » Fri Sep 02, 2016 1:31 pm

You could make your own timer.
lerp(variable.self,target,something*dt)
variable.self is greater than n, do foo
Image ImageImage
B
169
S
50
G
174
Posts: 8,327
Reputation: 110,798

Post » Fri Sep 02, 2016 10:10 pm

Look for "Minimum framerate' in this document: https://www.scirra.com/tutorials/67/del ... dependence

10-15 fps is a serious deviation from the 'acceptable fps that is smooth correctable by dt'.

The best solution is to optimize the game.

Setting the minimum framerate to 10 is a no, no.
Collissions will not be dedected and all sorts of other culprits.

You can make a timer based on the expression 'wallclocktime'.
The maximum error will then be the timeresolution, beeing 1 * dt, but usualy 1/2 * dt.
Dont use =, use > or <.

But, altaught this timer will be reasonable right, still ....

The BEST solution is to optimize the game, to keep dt between realistic boundarys.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 13 guests