Debug Panel improvements
While I still have them fresh in my mind, here is a list of potential improvements for the new Debug Panel :
- ~~add the possibility to show/hide the panel through a parameter in the URL~~
- ~~add Chrome memory/heap profiling information (see for example : http://coderwall.com/p/2va2mg)~~
- ~~track objects total update duration~~
- ~~track objects total draw duration~~
- ~~track numbers of rect created (N/A)~~
- ~~add some useful graphs ? (heap, update/draw duration ?)~~
- add a basic console
- ~~make it scalable (canvas size independant)~~
- ~~make it a float object (on top of the game canvas and not in the canvas)~~
I'd like to see some debug numbers for loaded resources, too:
- Number of images loaded
- Number of sound files loaded
- Number of XML files loaded
- Number of binary files loaded
- Number of open audio channels
- Number of audio channels playing
Good ones too, I guess we will need a bigger debug panel :)
Would the "basic console" provide anything that window.console doesn't? We already get messages and can run JavaScript in them. ;)
Could be useful I guess for old IE...
Per frame statistics would be cool. See Florian's comment on this article:
https://blog.mozilla.org/javascript/2012/08/28/incremental-gc-in-firefox-16/
I was just thinking that refactoring the debug Panel using the plugin mechanism would be a good idea, any thoughts ?
the point being that once in production, the corresponding (debug) code is completely useless.
i'm updating the milestone for this one (0.9.6), as I won't provide anymore update for the coming 0.9.5
I must add a bug I just found. If the viewport offset is not (0,0), the click area is not correct. So if the camera is moved to (100,100) for example and you click on the renderHigBox checkbox, it won't detect it as a click.
Hi @nvlbg
Using the very last version (0.9.5), and the provided "platformer" example (where the debug panel is used) I cannot reproduce it on my side. Do you have a specific example where I could the issue ?
Actually, it looks like if the cam is moved on the x axis this does not happen, but it happens when the cam is moved on the y axis. You can check it here - http://92.62.251.95:8080/
P.S. It is my local server, so it is not up 24/7.
@nvlbg fixed !
Moving this one as well to 0.9.8 as I don't believe further improvements will be done as part of 0.9.7 ;)
An internesting lib that would allow to design a better debug panel : http://code.google.com/p/dat-gui/
Added basic update & draw millisecond durations: https://github.com/melonjs/melonJS/commit/63072b10a6567394ed4a4f333e9ecdf9024721de
i'm not seing anything major left here, so I will close it for now. if any particular feature stands out (that I don't see here), we can then open a new ticket