FastClick Posted January 7, 2014 Share Posted January 7, 2014 Hi.As I know default fps is 60. How to set FPS to 30?Thanks. Link to comment Share on other sites More sharing options...
Pedro Alpera Posted January 7, 2014 Share Posted January 7, 2014 I think you can´t set FPS to 30. http://gametest.mobi/phaser/docs/Phaser.Time.html#toc5 It's a read-only property. Link to comment Share on other sites More sharing options...
FastClick Posted January 7, 2014 Author Share Posted January 7, 2014 Yes, I know about this property, thanks. But maybe exist other ways to change FPS?Rich, please help me =) Link to comment Share on other sites More sharing options...
Chris Posted January 7, 2014 Share Posted January 7, 2014 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 More sharing options...
FastClick Posted January 7, 2014 Author Share Posted January 7, 2014 So I was hoping to reduce the number of requests for rendering and reduce the lugs in my game. Link to comment Share on other sites More sharing options...
Mike Posted January 7, 2014 Share Posted January 7, 2014 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. shohan4556 1 Link to comment Share on other sites More sharing options...
FastClick Posted January 8, 2014 Author Share Posted January 8, 2014 Ok, thanks to all =) Link to comment Share on other sites More sharing options...
Tarion Posted January 8, 2014 Share Posted January 8, 2014 What kind of lag do you have? Usually lag = lower FPS.What you can do is take some timestamps before and after expensive methods and get some timings. JS is single threaded, so if you block somehow the FPS will go down. Link to comment Share on other sites More sharing options...
Recommended Posts