melonJS icon indicating copy to clipboard operation
melonJS copied to clipboard

Debug Panel improvements

Open ghost opened this issue 14 years ago • 14 comments

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)~~

ghost avatar Sep 19 '12 08:09 ghost

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

parasyte avatar Sep 24 '12 07:09 parasyte

Good ones too, I guess we will need a bigger debug panel :)

ghost avatar Sep 24 '12 14:09 ghost

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...

parasyte avatar Sep 29 '12 18:09 parasyte

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/

greghouston avatar Oct 14 '12 01:10 greghouston

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.

ghost avatar Nov 28 '12 03:11 ghost

i'm updating the milestone for this one (0.9.6), as I won't provide anymore update for the coming 0.9.5

ghost avatar Jan 28 '13 08:01 ghost

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.

nvlbg avatar Jan 28 '13 13:01 nvlbg

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 ?

ghost avatar Jan 28 '13 13:01 ghost

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 avatar Jan 28 '13 13:01 nvlbg

@nvlbg fixed !

ghost avatar Jan 28 '13 14:01 ghost

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 ;)

obiot avatar Apr 17 '13 04:04 obiot

An internesting lib that would allow to design a better debug panel : http://code.google.com/p/dat-gui/

obiot avatar Jul 21 '13 11:07 obiot

Added basic update & draw millisecond durations: https://github.com/melonjs/melonJS/commit/63072b10a6567394ed4a4f333e9ecdf9024721de

agmcleod avatar Dec 05 '13 00:12 agmcleod

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

obiot avatar Jul 23 '14 10:07 obiot