Resolved - Debug best practices

0 favourites
  • 7 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Can anyone suggest some best practices for having a 'debug version' of my game? When I release my game, I want to turn off all debug features I've added (logging to screen, debug hotkeys, etc) in the released version, but I then want to turn them back on in my working version. I can see myself forgetting to turn them off for a release so wondering if there's a good approach for this?

    Thanks

  • Quite simple: System > Is in preview

  • That's quite simple indeed - Thanks!

  • Another option would be to have an entire event sheet dedicated to your debug events and include it in your main event sheet - then remove it before export. I like doing it this way as all debugging systems are located in one place.

    *Edit* Although re-reading your OP, I see that you're specifically concerned about forgetting to turn it off. If that's the case, stick to Wacky's suggestion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another option would be to have an entire event sheet dedicated to your debug events and include it in your main event sheet - then remove it before export. I like doing it this way as all debugging systems are located in one place.

    *Edit* Although re-reading your OP, I see that you're specifically concerned about forgetting to turn it off. If that's the case, stick to Wacky's suggestion.

    He could add all the events related to debugging below a specific group.

    And use "is in preview", to enable or disable that specific group.

    On the other hand, best practice would be to not forget it :P

  • He could add all the events related to debugging below a specific group.

    And use "is in preview", to enable or disable that specific group.

    This is exactly what I'm doing. The "is in preview" keeps me from having to remember to remove it manually before export.

  • I use a global layer included on all layouts containing a transparent debug "console box" (sprite) with dragdrop behavious that has various "godmode" buttons and text about what is going on behind the curtains (ex. "looping through inventory").

    Keep it in "is in preview" and set text to "right(textobj.text,100)" to prevent memory leak, be aware of any debug related code that may run even if its not in preview that could hog memory after hours of play.

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