grossd's Recent Forum Activity

  • thanks.

    what if i include such a console message in the runtime.js

  • Thanks!,

    So this means you need to add a browser.print statemement everywhere of interest.

    How about if you could do the following:

    system.oneventfire

    layoutname="L1"

    gameState=1

    browser.print system.eventfired.Name & system.currentAction

  • Hi Ashley,

    I now checked, and now recalled an initial issue.

    Breakpoints can not be placed on trigger events, which reduces the utility of tracing via the debugger. Hence, it seem that reviving my initial idea of having an explicit system event for tracing selected calls, could be quite helpful.

    Dan

  • Good idea. Didn't know this feature existed ...

    Although a idea of system events for events firing and action execution, could still be interesting in its own right -- although, probably, at a lower priority ...

  • Here is one example how this could look like in C2. Essentially, the System "plug-in" gets the following additional event conditions.

    System.before any event fire

    System.after any event fire

    System.before any action executed

    System.after any action executed

    And two system variables that hold the string of the event condition that fired, and a string that holds the action executed. Ideally, it would be nice if some event conditions and actions could be tagged, and the tags would show up in a system variable also.

    If one wants to make code further customizable, then there could also be a system action to stop the execution of an action. System.Discard Action. This would make this facility very close to aspect-oriented programming facilities -- i.e. code can be overridden.

    thanks,

    Dan

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alternatively, in spirit of aspect-oriented programming/meta programming, it would be great to have a system "meta function" that is triggered for every event that fires and every action that gets executed ... while also passing along the meta information -- such as layout name, event expression (and even a unique identifier), action name, etc.

    This could then be customized via event conditions to produce a trace or other interesting features across C2 programs ...

    Dan

  • Hi,

    Is there a way to "switch on" a log for an execution trace -- perhaps some kind of hidden C2 function (@Ashley)

    If not, i think this would be a great help to debugging in particular for complex event, function call interactions. Instead of requiring to instrument all of the code with trace code.

  • Indeed. harrio,

    I find the C2 programming approach very appealing, and am wondering how it could be put to use, for other kinds of general purpose programming, such as in developing general purpose chrome extensions, which could of course also include game elements ... -- instead of falling back onto straight Javascript programming only.

  • Thanks for testing Do you think you could provide a link to the project file ... But, thinking theoretically, its hard to conclusively prove with test cases.

    I am trying to instead use call backs and varying secondary conditions (states) to order sequences independent of the layout include sequence; and for critical items I currently duplicate them in the "parent" layout ... (for example for processing that has to happen on end layout)

  • Hi,

    Is it possible to export or otherwise easily wrap a C2 app, as a chrome extension? If yes, are there perhaps any examples?

    thanks,

    Dan

  • Thanks.

    I guess its a bit ambiguous in the manual:

    "Start & end

    On end of layout

    Triggered when the layout is ending. This can happen when the project goes to a different layout or when the project closes."

    I guess it depends what project closing means.

    https://www.scirra.com/manual/124/system-conditions

  • Hi

    I wrote a short test app, to count the duration in seconds from pressing a start button. The app runs in node webkit. Upon closing the browser window, i expected the on layout end to trigger, as per manual. However, the event does not get triggered.

    I am including a link to the test project: https://dl.dropboxusercontent.com/u/102 ... Close.capx

    is this a know issue?

    thanks,

    Dan

grossd's avatar

grossd

Member since 4 Feb, 2014

Twitter
grossd has 1 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies