Question about physics and DT

Discussion and feedback on Construct 2

Post » Thu Apr 26, 2012 9:53 pm says:

Note that Physics is an exception. By default it does not use dt, and therefore is framerate dependent. This is because dt usually has small random variations. These variations can make the same setup in a physics game give different results even if exactly the same thing is done twice. This is often annoying for physics games, so by default it is framerate dependent.

My question:
What can I expect from a square or ball-sprite with "set stepping to framerate independant" set to on and a ball-sprite set to "fixed"?

Only: prepare to see possible different movement everytime the layout is run?
Are there other things to keep in mind when choosing for one or the other option?rogerty2012-04-26 21:54:54
Posts: 596
Reputation: 4,959

Post » Thu Apr 26, 2012 10:38 pm

Hi, check my game saved by the balls in scirra arcade, the game is framerate independent, objects with physics behaviour runs independent from framerate Fluctuations, the game is almost unplayable without this.Use stepping interactions aswell to finetunning the physics in your game for a better game experience.
cesisco2012-04-26 22:42:24
Posts: 379
Reputation: 10,149

Post » Thu Apr 26, 2012 10:39 pm

Well, the article has pretty much said everything. Generally, when using framerate independent physics, movement more or less looks the same, but it is not pixel perfect - there will be lots of very small random variations each time you run it, because dt tends to have small random variations. This made a lot of people complain because they couldn't guarantee that an initial setup would work the same way every time, so people might occasionally lose a game due to random chance, or they couldn't make it easy to guarantee a level was even possible. So by default it uses fixed - the motion will be almost identical, but exactly reproducible every time. I'd recommend using framerate independent whenever you possibly can get away with it because as the article says it's generally better, but fixed is just to stop people worrying about reproducability.
Scirra Founder
Posts: 22,822
Reputation: 176,618

Return to Construct 2 General

Who is online

Users browsing this forum: calebbennetts, Yahoo [Bot] and 6 guests