XekeDeath Posted February 27, 2014 Share Posted February 27, 2014 I noticed a few days ago that the game.time.fps variable is not changing for me.It is always 0. I am using the absolute latest Phaser 1.2, updating every morning when I get to work (so about an hour ago) Link to comment Share on other sites More sharing options...
Luiz Bills Posted February 27, 2014 Share Posted February 27, 2014 can you show your code? Link to comment Share on other sites More sharing options...
XekeDeath Posted February 27, 2014 Author Share Posted February 27, 2014 There is only one place that I reference the fps variable in the entire code base://First line in the GUI class update function.this.fps.setText("FPS: " + this.game.time.fps);This used to work fine, so I am wondering if Rich changed something in the back end that I missed and did not adjust for. The only other place I reference game.time is here: //Create function of the main game state...this.game.time.events.loop(Phaser.Timer.SECOND, this.timeMinute, this);this.game.time.events.loop(Phaser.Timer.SECOND*15, this.timeQuarterHour, this);this.game.time.events.loop(Phaser.Timer.SECOND*30, this.timeHalfHour, this);this.game.time.events.loop(Phaser.Timer.MINUTE, this.timeHour, this); And those timers now work perfectly, no more psycho timers. Link to comment Share on other sites More sharing options...
rich Posted February 27, 2014 Share Posted February 27, 2014 Always always read the README when doing a fresh pull! Specifically the Significant API changes section But here's the bit you need:* Time.advancedTiming is a new boolean property. If true Time.fps, fpsMin, fpsMax, frames, msMin and msMax will be calculated, otherwise they remain at their defaults. WombatTurkey, clark, jackrugile and 3 others 6 Link to comment Share on other sites More sharing options...
XekeDeath Posted February 28, 2014 Author Share Posted February 28, 2014 But reading readmes takes precious seconds out of my day! I could be watching streams, playing games, or making forums posts asking for answers that are contained within the readme with those seconds!Also, I'm using the GitHub desktop app thingy that doesn't show me the readme in its entirety. Silly program. Guess I'll stop being lazy and either open the github page, or look through the commits each morning, which is probably a good idea anyway... Thanks Rich. Link to comment Share on other sites More sharing options...
valueerror Posted March 1, 2014 Share Posted March 1, 2014 There is a readme file? Cool ..more information to eat for me Link to comment Share on other sites More sharing options...
ashes999 Posted October 2, 2014 Share Posted October 2, 2014 For those of us who are easily confused, the correct usage is: 1) game.time.advancedTiming = true (for example, in your state's create)2) game.time.fps returns the current FPS (after the first 1s of your game). You can draw it in your state's update method. Link to comment Share on other sites More sharing options...
xerver Posted October 2, 2014 Share Posted October 2, 2014 Or you can use: https://github.com/englercj/phaser-debug ;D valueerror 1 Link to comment Share on other sites More sharing options...
valueerror Posted October 3, 2014 Share Posted October 3, 2014 do you plan to give us even more information in phaser-debug? i'd really like to have an easy way to find out what functions cause the peaks in the graph... Link to comment Share on other sites More sharing options...
xerver Posted October 3, 2014 Share Posted October 3, 2014 do you plan to give us even more information in phaser-debug? i'd really like to have an easy way to find out what functions cause the peaks in the graph... If only there was some way for people to put in feature requests so I know what they want....hmmm... Also the functions causing the graph peaks are in the left hand side. If you need more specific data than that you should use chrome profiling tools. Link to comment Share on other sites More sharing options...
valueerror Posted October 5, 2014 Share Posted October 5, 2014 If only there was some way for people to put in feature requests so I know what they want....hmmm... lol.. thx.. i will think about that.. Link to comment Share on other sites More sharing options...
Code Looper Posted May 12, 2015 Share Posted May 12, 2015 Hi, just for those new to Phaser, could someone please spell out how to display FPS on the screen plz ? Link to comment Share on other sites More sharing options...
Recommended Posts