# problem with FPS, easy question, maybe some math?

Get help using Construct 2

### » Thu Apr 09, 2015 11:22 pm

I have a easy question...

result:

I made an easy example, we have a blue square that is moving at angle 0 by 600*dt pixel every tick...(so, if you change the timescale, will be fine) with a countdown.

in 60 fps, for example, the square reach 490px, but a 34 fps, will be 859.... I read somewhere how to fix this problem by some formula...but I don't remember...

I would like to have the same result(o very close, like 20 different px it's fine) with different fps...

thank you very much
B
21
S
9
Posts: 298
Reputation: 2,972

### » Fri Apr 10, 2015 2:36 am

Look at event 3 -- you're subtracting timescale from countdown. Since timescale doesn't change with the framerate, it will always take the same number of frames for it to reach zero, even if it takes more time. Thus, at lower framerates countdown will take longer to reach zero and the sprite will move farther.

Try subtracting (60 * dt) instead -- this should give you the same result regardless of framerate.
Moderator
B
114
S
41
G
20
Posts: 1,586
Reputation: 19,161

### » Fri Apr 10, 2015 9:42 am

linkman2004 wrote:Look at event 3 -- you're subtracting timescale from countdown. Since timescale doesn't change with the framerate, it will always take the same number of frames for it to reach zero, even if it takes more time. Thus, at lower framerates countdown will take longer to reach zero and the sprite will move farther.

Try subtracting (60 * dt) instead -- this should give you the same result regardless of framerate.

that is, 60*dt, thank you very much, I was trying 60/dt
B
21
S
9
Posts: 298
Reputation: 2,972