San4er Posted September 20, 2014 Share Posted September 20, 2014 I saw some game requirements of some sponsors and portals. One of them was a clear console without any debug info in it.When I use Phaser it executes showDebugHeader() at the start by default and AFAIK there is no way to turn it off.I can only disable it by commenting this function on the source code of phaser.js.My question is - can I do that? Is it OK or wrong to do that? I respect Phaser.js developers and if they want to show it necessarily, I won't hide it.And it would be good if it could be disabled in a way like:game.debug.showDebugHeader=false;or something like that:) Link to comment Share on other sites More sharing options...
rich Posted September 22, 2014 Share Posted September 22, 2014 There are hundreds of Phaser games over hundreds of different portals, all showing that header. So I wouldn't worry about it. It's not "debug" info in the sense they mean. If you really do want to remove it then you can edit the call out of core/Game.js and rebuild your own version. You are absolutely allowed and free to do this, but it's not something we're going to provide directly via the API as it has proven to be the most effective form of getting Phaser known, ever Link to comment Share on other sites More sharing options...
San4er Posted September 23, 2014 Author Share Posted September 23, 2014 Ok, if you say so, I will not remove it. It's just my first game and I don't know all details about game publishing and selling Thanx for replying to my newbie questions Link to comment Share on other sites More sharing options...
SET001 Posted November 29, 2016 Share Posted November 29, 2016 This is also annoying in unit tests output when you have new game instance created before each of hundreds tests. Currently in my tests I'm turning this off by overriding showDebugHeader with empty function: beforeAll(()=>{ Phaser.Game.prototype.showDebugHeader = function(){} }) But it would be nice if we have valid switch for that. Link to comment Share on other sites More sharing options...
rich Posted November 29, 2016 Share Posted November 29, 2016 There is already a global switch to disable this (my post above is from 2014.. things change): window.PhaserGlobal = { hideBanner: true }; I cannot stress enough how important it is to have a local copy of the source code. Had you looked at that first, you would have seen the first line of the showDebugHeader function is: if (window['PhaserGlobal'] && window['PhaserGlobal'].hideBanner) { return; } Which would have answered your question instantly. Link to comment Share on other sites More sharing options...
SET001 Posted November 29, 2016 Share Posted November 29, 2016 Indeed! Can't believe I missed that looking in code. Thanx! Link to comment Share on other sites More sharing options...
Recommended Posts