Logging recommendations / best practices?

0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • For the more experienced programmers in the community: what are some best practices for logging debug-type data in C3?

    I use some simple logging in my code for debugging purposes. Basically I have the simple function below that prints to a text object, which is in a layer called 'debugLayer'. Every layout in my game has a 'debugLayer' layer, and pressing the 'd' key toggles visibility of that layer. I call printToErrorText throughout the code to log what I feel may be helpful or relevant for debugging, but other than calling it once at the beginning of every function (with the function name and parameter values as the str argument) I don't have any consistent rules on when to use it.

    This method has been helpful, but I have to think there are better ways to tackle logging with C3. Would love to hear what's been working for the C3 veterans out there.

  • The most common method is to use Browser Log action. It will log messages to browser console, you can use different colors (error, warning), group several messages together etc.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Great idea, I never knew about that! I'll add that action to my printToErrorText function and play around with it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)