How do I limit the game frame rate?

0 favourites
  • 11 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • I would like my game to run at a constant 30fps. Is there an easy way?

    Thanks

  • This is not supported. I'm not aware of any good reason to do this - if the game can run at 60 FPS, why not let it?

  • I cant find a way to do a variable jump on a platform game that's not affected by the CPU. The less powerful the computer, the smaller the jump is regardless of delta time. This makes my game unplayable on the 3gs and iphone 4 (using CocoonJS) as you can't make the jumps on these systems (on 4s and 5 it is fine).

    If you have any solution to this problem I would be very grateful.

  • Does C2 user timer based movement? Will my game play the same if it's running at 30 or 60fps?

  • bjadams - yes, Construct 2 movements work the same regardless of the framerate. See delta time and framerate independence for more information.

    slw666 - unfortunately a delta-time based movement like Construct 2 uses can result in slight random variations in the movement. Reducing the framerate won't necessarily solve this problem either. The best thing to do is design your game so pixel-perfect movement is not necessary. I'd increase the jump height a little so it works reliably everywhere.

  • Thank you for your reply Ashley.

    I really wouldn't mind if it was a case of a slight fluctuation in height but if I make the height acceptable on the 3gs (i.e. so he can make the jump), the iPhone 4s is literally jumping out of the screen, probably double the height. I'm not sure if I'd go as far as to say this was a bug, but it does make platform games near unplayable at the moment on mobile platforms.

    Are there any work arounds or is this possible to fix?

    (P.S. I really appreciate you taking the time to respond to us)

  • slw666 - it definitely shouldn't be as much as double, are you using the built in platform behavior? Can you share a .capx showing the results?

    Also, are you having extremely low framerates on the 3GS? If the framerate is under 10, it could be highly unstable.

  • Hi Ashley,

    The 3GS is mid 20's according to CocoonJS. I have spoken to the guy doing the art and he doesn't mind me emailing you directly the .capx file if that is possible.

    I am currently using the default platform behaviour with an extra variable to increase the -y vector when the player keeps a hold of the jump button.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any advice yet or possible fix?

  • slw666 - can you make a repro from a new empty project demonstrating the issue and post it here? It could be a mistake in your events, and this step would eliminate that possibility.

  • No problem, I will spend a bit of time tomorrow afternoon and upload

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