Jump to content

How to set FPS to 30?


FastClick
 Share

Recommended Posts

You cannot set the render cycle of the browser to do 30fps - it will always align itself to 60fps because thats the framerate the monitor runs with as well. Calculating more than 60fps would be a waste of calculations.

 

However, if you WANT your game to run at 30fps, you can simply skip every 2nd frame and do nothing there. But why would you want to do that?

Link to comment
Share on other sites

Limiting the FPS is not going to fix an issue like that. Even oposite you should've try setting the FPS higher if possible :)

 

So best way is to share code and upload the game so we others can test and tell what the cause of the lag maybe is.

Also chrome profiler is good tool to see what eats most memory:

 

Check this:

http://www.html5rocks.com/en/tutorials/canvas/inspection/

and this:

http://www.realtimerendering.com/blog/webgl-debugging-and-profiling-tools/

 

 

A frame represents a single pass through the your page's event loop. This involves running JavaScript, handling events, updating the DOM, style changes, performing layout and painting & compositing the page. For smooth animation, you want each frame to take less than 1/60th of a second, or 16.6 ms.
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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