SohwStats and Debug

Post your help queries and engine programming questions here

SohwStats and Debug

Postby RiaanPie » Mon Aug 01, 2016 1:44 pm

Hi there

A question about debugging.
I look through the sample files as well as through my current project and using the showStats and debug code doesn't appear to make any sort of difference to outputs.

Code: Select all
ige.showStats(1);
      ige.input.debug(true);


In the video tutorials, the author has a nifty popup that appears where he can inspect objects and such, but I can't seem to get that? I also am not able to stop the console outputs.
RiaanPie
 
Posts: 20
Joined: Fri Jul 22, 2016 2:20 pm

Re: SohwStats and Debug

Postby rob » Mon Aug 01, 2016 2:44 pm

It could be that you haven't included the CSS required to display the stats? Can you inspect your HTML and see if the elements are there but just not visible because they don't have styling?

Also I *think* that global debug can be switched on and off via ige.debug(false)
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: SohwStats and Debug

Postby RiaanPie » Mon Aug 01, 2016 8:14 pm

The blank_game forlder doesn't appear to come with any css any more. Has it been removed? If not, where is it located?
RiaanPie
 
Posts: 20
Joined: Fri Jul 22, 2016 2:20 pm

Re: SohwStats and Debug

Postby rob » Mon Aug 01, 2016 10:43 pm

I think it's up one level in assets.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: SohwStats and Debug

Postby RiaanPie » Tue Aug 02, 2016 8:53 am

Rob, is it possible to give me an idea of what should be in the CSS file? There's no css file in assets, but there's various css folders elsewhere (like in the engine and documentation folder). Apologies for the inconvenience. If I know what to look for, I can probably find it (If it is still part of the download).
RiaanPie
 
Posts: 20
Joined: Fri Jul 22, 2016 2:20 pm

Re: SohwStats and Debug

Postby rob » Tue Aug 02, 2016 10:03 am

So I think my info was out of date, the editor example shows how to display rendering stats (examples/100-editor). showStats(1) is deprecated from the engine.

The editor client.js starts up the editor component:

Code: Select all
var Client = IgeClass.extend({
   classId: 'Client',
   
   init: function () {
      var self = this;
      ige.addComponent(IgeEditorComponent);
      self.gameTexture = {};
      
      // Create the HTML canvas
      ige.createFrontBuffer(true);

      // Start the engine
      ige.start(function (success) {
         // Check if the engine started successfully
         if (success) {
            // Load the base scene data
            ige.addGraph('IgeBaseScene');
            
            // Show the editor
            //ige.editor.show();
         }
      });
   }
});
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: SohwStats and Debug

Postby RiaanPie » Tue Aug 02, 2016 1:40 pm

What a legend, that works a treat! :) thanks again.
RiaanPie
 
Posts: 20
Joined: Fri Jul 22, 2016 2:20 pm

Re: SohwStats and Debug

Postby Sandstedt » Fri Oct 21, 2016 4:18 pm

Tried your solution, but only got
Code: Select all
TypeError: Cannot read property 'show' of undefined
. Can I find this debugging tool in the API docs?
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm

Re: SohwStats and Debug

Postby Sandstedt » Fri Oct 21, 2016 4:21 pm

Sorry, didn't read you example correctly. So the answer is to add and component with the name IdeEditorComponent :)

Code: Select all
// Show the editor
ige.addComponent(IgeEditorComponent);
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm

Re: SohwStats and Debug

Postby RiaanPie » Mon Oct 31, 2016 2:02 pm

Please help me to get rid of all the automatic console output?
I want to move to production but there's a ton of output that I dont want there.
RiaanPie
 
Posts: 20
Joined: Fri Jul 22, 2016 2:20 pm

Next

Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron