This forum is currently in read-only mode.
  • So do built in behaviors like Platform/8 Direction/etc take this into account when moving objects?

  • Yes, all the built in behaviors use TimeDelta.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • However, if your game requires pixel perfect collisions, and you don't want to risk an object "skipping through" parts of your level because the frame rate dropped too much, then that's when you should use a fixed frame rate.

    Actually you just have to set bounds on your game world

    Say your thinnest object is 10px wide on it's smallest side (careful with convex objects). Then you can't have *any* object move 20px or more on a single tick, else you risk skipping it. Then you gotta cap it. Say your fastest object goes at 100px per second (100*Timedelta).

    We'll set a safety margin of 15%

    20px * (1- 0.15) = 20px*0.85 = 17px

    100[px/s] / 17[px] = 5.8[1/s]

    thus 5.8 is the minimum FPS, which can be set directly in Construct.

    Test: at 5.8FPS (5.8[1/s]) an object going at 100[px/s] will advance 100/5.8 [px] = 17.24, which is less than our thinnest object (20px), thus collision would be detected.

    With unaligned bounding boxes or pixel-perfect collision however things change, as a tiny corner of a big object could mean a collision. In that case you just gotta decide (in numbers) how forgiving the game is.

    (this took quite a while to piece together, did a long time ago)

    Edit: some math and spelling goofs

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)