Ricardo Cabello released a really nifty stats tracker the other day. Just download the Stats.as file from his Google Code site, create the following folder structure: net / hires / utils and place the Stats.as file into that. Once done you can import the package into your own code and make use of it.
The end result? A beautiful little real-time performance display that looks like this:
The FPS gives you a current and maximum frame rate count (the maximum is derived from the stage frame rate setting). The MS is a micro-second counter. MEM is the total memory (in MB) your SWF is using.
The cute little graph below that is a historical visualisation of these three things, so you can watch for spikes / peaks during activity. You can click the top/bottom of the stats to increase/decrease the stage framerate.
Using it is as simple as adding one line of code:
All I’d say is remember to make sure this happens on the TOP of all of the rest of your display list items.
Make yourself heard
All about Photon Storm and our
HTML5 game development services
Filter our Content
- Cool Links
- Flash Game Dev Tips
- Game Development
- Geek Shopping
- In the Media
- Phaser 3