Jump to content

Framerate issue


KirUn
 Share

Recommended Posts

Hello everyone.

I am currently developing fast paced html5 game and I want to ask you some opinion and advice about framerate.

What is recommended fps by default? 30 or 60? 60 looks much more smooth for me, but in general, many people cant tell any difference and, also, 60fps is twice resource consuming as 30, so it could be a problem on some devices.

I know, that optimal solution is dynamic framerate, but it require some serious work to dodge collision bugs etc..

What is current standart with html5 games?

Link to comment
Share on other sites

Some people have super-duper monitors that break the legendary 60fps, they'll tell you they can tell the difference between 60 and 120.

I think the myth about 30fps comes from TV's, that traditionally operated at something like 24fps, although I'm not sure thats try any more either.

Try moving a sprite backwards and forwards across the screen and change the fps (use a tick and then just throttle it to get whatever fps you want), I'd wager most people will tell you 30 looks jerky, 60 is smooth (I've done this test on several groups, but nothing statistically significant).

Your browser will typically ensure your display updates at 60fps and I don't think there is anything you can do about that, even if you have a super screen. Similarly, if you're animating with CSS it’ll render at 60fps (if it can) and I don't think you can change that either.

I agree with tips though, it only matters for consistently moving entities or if you do something like hang your timing off the fps (not generally recommended).

Link to comment
Share on other sites

On 10/16/2016 at 1:44 AM, KirUn said:

I know, that optimal solution is dynamic framerate, but it require some serious work to dodge collision bugs etc.

Fortunately, once you have a dynamic framerate system set up, there are usually just a few problem areas, like the physics update issue you mentioned, and there are usually some good known solutions for those.  For instance, with collision you can run several short physics/collision cycles in one frame (as many as you need to match how much time has passed), and leave the rest of your logic based on a dynamic frame rate.

As mattstyles says, hanging all your game timing off fps is not good.  You'll eventually regret it - for one reason or another your game will be running faster or slower than you expected, and all the game timing will be wonky.  Deltatime is golden.  And once you have it, you can do cool things like artificially slow your calculated deltatime down for slow-motion effects, without rewriting any game logic.

On 10/16/2016 at 1:44 AM, KirUn said:

What is recommended fps by default?

What goals are important to you?  Ultra smooth animation and responsiveness all the time?  Great.  Target 60fps and make sacrifices elsewhere (in game logic and scene complexity).  But if you're just trying to ship a fun game, I'd say don't lose too much sleep over it - plenty of games running at 30fps are perfectly playable!

And it's just a target, anyway - since you can't generally control the hardware your game is run on, you can target 60fps all you want and you won't always get it, which is part of why you really need a system that can adapt to any frame rate the host device supports.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...