Physics affected by fps: framerate dependent!

Discussion and feedback on Construct 2

Post » Thu Jul 19, 2012 2:45 am

Tried the Physics rolling project that comes with C2 in Firefox and Chrome, and the gameplay is twice as fast in Chrome.

The fps shows that it runs at 120fps, which should just make it runs smoother, not faster than FireFox's 60fps. Chrome bug? Or Firefox bug (being too slow)? I'm used to working with FF as a test browser.

EDIT: Not happening with the Space shooter or Platformer projects. Seems like it's physics only, some problem with Impulse applied to objects. Not sure if it's a browser or C2 issue.

Could be that because the browser runs at 120fps, the impulse is applied every frame and this means twice as many times on Chrome which results in faster movement of the physics object.

Also, games run way smoother in Chrome... they seem to jitter in Firefox even when running at 60fps. Do we know why?

Using R99.
Latest Chrome.
Latest FireFox.MoonQuake2012-07-19 13:02:32
B
3
Posts: 6
Reputation: 587

Post » Thu Jul 19, 2012 10:59 am

Physics is framerate dependent by default, so will run faster at a higher frame rate, though you can switch to independent. There's a manual entry on it somewhere.
Problem withn switching it is that the physics will work slightly different each time.
B
31
S
11
G
7
Posts: 197
Reputation: 6,682

Post » Thu Jul 19, 2012 12:36 pm

Searching for Framerate independent got me to the right place: http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence

Searching for Chrome framerate or fps didn't work.

Thanks Andy

You guys know why even though hardware accelerated physics intense games aren't so smooth when played in Firefox? Could it have anything to do with the scroll-to behavior? MoonQuake2012-07-19 12:59:23
B
3
Posts: 6
Reputation: 587


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests