grossd's Recent Forum Activity

  • Hi,

    I am using Tiledbackground to create a sold background color, and am setting text color to contrast well with the background.

    I'd like to allow the user to configure the color pallete for the game. This means that the user can choose a different background color and text color. I couldnt see a way to change color for tiled background only to load an image from a URL. I tried to load an image using the image name only, like in AJAX file load, but this failed.

    Is there a way to change colors programmatically both background and text.

    thanks,

    Dan

  • getting it mixed up all the time

    With your correction my little hack will be even more easily found with google ...

  • Indeed. Working with families allow creating a level of "indirection" - i.e. avoiding the "hard coding" of object types in event and action code. Like this object types can be exchanged, without needing to change any code

  • Interesting idea.

    But the log would then only include function calls. It would be nice to have more details -- such as event clauses, action execution, and perhaps even a dynamic watch list -- like during debugging.

  • 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

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

grossd's avatar

grossd

Member since 4 Feb, 2014

Twitter
grossd has 1 followers

Trophy Case

  • 12-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

17/44
How to earn trophies