Search code examples
melonjs

MelonJS debug mode


I'm using melonJS ( v3.x ) to develop my HTML5 game.

All is working fine in debug mode ( http://something:8000/#debug ), but if i test without de debug panel ( http://something:8000/ ), my scene is loaded and rendered but none of my events work ( keyBind, pointerBind etc..).

I have no idea from where the problem can come. I have no error in my logs, neither in my firebug. Again, all is working great in debug mode.. Any help ?

EDIT

My events also work fine, they are fired when called. The problem seems to come from the scene that is never updated...


Solution

  • Sounds like you are missing return true in your update methods. When an entity wants melonJS to render the scene, it should return true. This "repaint signal" is not sent by default, so that it can be used to optimize repaints when nothing in the scene is animating.

    The debug panel itself will return true every frame from its update method.