Platform behavior non fps independant?

  • Hello all,

    I'm doing another thread about that subject because I think it's quite important.(more visible here than in the bug section)

    I have issues on my game depending on the FPS. I use the platform behavior that comes with C2 and, depending on the fps, the jump height changes.

    I've made a little test here using the platform canvas. Try to jump on the walls on the sides. You can't, unless the fps gets under 20.

    So if a computer gets a low fps at a moment, the player can reach an unreachable location = HUGE GAME ISSUE.

    TEST CAPX

    I'm not the only one to have that problem :

    http://www.scirra.com/forum/frame-rate-affecting-player-jump-arc_topic62067.html

    So, if I'm not wrong and that problem really exists, the platform behavior should not be used for a "exploration game" like a metroidvania.

    (sorry if my english is rough)

  • Oh) I reached to that walls.

    When I test my small project on mobile as HTML5 - I noticed that character can fall through platform when landed ( fps was near 10 )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, yeah this is actually a significant issue.

    +1 to having a way to resolve this.

  • I have also noticed this with the jump thru behavior. On lower frame rates (slow machines) the player (witch has the platform behavior) falls thru the object that has the jump thru behavior.

  • It's a known issue and there's no clear solution short of disabling framerate independence, which brings its own issues. The best solution is not to make jumps which can only be achieved by a very close margin - give it a short extra distance so even small variations in the jump height don't affect whether the jump can be made or not.

  • Damn :/

  • Yeah, low framerates can cause glitches in all kinds of games. <img src="smileys/smiley5.gif" border="0" align="middle" />

    How about you check for the Y-difference from the beginning of the jump and compare it to a maximum jump height value? If it goes above you set the Y vector to 0.

  • PixelRebirth Well sadly it's not a solution.

    In the example I show here, when the fps is low, the jump height is higher.

    But on my game (CoinOp Story), when I try it on my laptop and have a low fps, the jump height is lower. (and my hero use the platform behavior)

    So the fps has an influence on the behavior but a random one depending on the game and perhaps the computer I guess.

  • That's a game breaker for most platformers...

    Just a thought could you not place an invisible barrier to stop the jump short, that is only destroyed when player has required upgrade?...

  • I made a quick example using DT to reduce the jump.

    It breaks at around 10 FPS.

    http://johnnysix.net/games/scirra/jumpdelta.capx

    Just created a variable for "initial jump" , and had the platform behaviour updated each tick :

    initialJump*( ( 60 - ( dt * 60 ) ) /60 )

    [ Edit- if I was better at maths I would have written something simpler. 60 is just arbitrary, I just picked it 'cos it's a nice number!]

  • JohnnySix   Thank you! I will implement that trick in my game, even if it still breaks. :(

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