Ashley's Recent Forum Activity

  • > Does the cost include all updates to CC2 forever?

    The license is for Construct 2 forever. Eventually (a couple years down the line) we'll come up with Construct 3. However, when we do that, we'll make sure there are some good upgrade deals for C2 users. This is the traditional software development model - it's likely we'll run out of money long-term unless we take this approach. We tried to suggest subscriptions to our userbase before but it was incredibly unpopular, so we'll have to go this way. Of course, there's plenty to do on Construct 2 first!

    When does the Early cost end, if a date has been planned?

    We haven't planned a date, but I guess it will be at least a couple of months.

    Does the cost include all updates to Construct versions 3, 4, etc. forever, or will there be planned discounts for CC2 paid type people things?

    As before there will be discounts, and everyone who has bought C2 within a certain time period of C3's release will get it free too. It's too far in the future to give specific details though.

    Does any version of CC2 have an update feature, or are all updates at this moment manually to be downloaded? If manual, any update button for the future of the client?

    Right now C2 has a simple update prompt - it tells you if a new version is available, but you have to download and install it yourself. We're planning to make this smoother in future.

    What is the difference between scirra.com/construct2/releases/new and scirra.com/construct2/releases/r51.2 or are they both the same?

    The /r51.2 URL always goes to release r51.2. The /new URL always goes to the newest release whatever it is. So when r52 is out, /r51.2 goes to r51.2, and /new goes to r52, etc. If you're copying and pasting the link it's best to use the /new one, since it keeps itself up to date.

  • Can you make a new .capx that reproduces it and post that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you tried r51.2? It went up today with an attempted fix for this.

  • Is it a continuous FPS drop or a one-off? Can you post an example? It seems to work fine for me.

  • You do not have permission to view this post

  • OK, r51.2 is up on the site. Could you give it a shot?

  • Yep, there's Box2DWeb recently released which is Box2D in javascript.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • I can reproduce, but as soon as I switch to a layout tab it re-enables. Are there situations it never enables?

    If you open a project and the first tab is an event sheet, it's not clear what layout should run when you press Run Layout (for example, the event sheet could be included by 5 other event sheets, so which is its associated layout?). So C2 waits until you switch to a layout tab to know that's the layout you want to run. You can always right-click and run in the project bar, too.

  • BTW I can't seem to find that error message anywhere in the source code, are you sure it said exactly that? Was it a messagebox or a balloontip?

  • First of all, some tips:

    • script didn't run at first because you don't declare 'i' and 'len' before using them in some places (remember C2 scripts run in strict mode)
    • don't use 'this.memberFunction = function(...' to make member functions. Add them to the prototype, e.g. 'behinstProto.memberFunction = function(...'. If you assign a function to this.memberFunction, each instance of the behavior gets its own copy of the function which wastes memory.
    • those conditions are pretty expensive O(n^2) - you might want to build in, or at least encourage users to use, some kind of timed update (like every 500ms, rather than every tick). IIRC the Classic turret behavior updates the range checks every 500ms.

    The main problem:

    You wrote in a comment "C2 will invert the picking automatically for us". It doesn't! It only inverts the result of the condition function (return true/return false). C2 has no idea what the body of your function does and has no control over it. The way you've written it, you pick objects within range to the SOL even when the condition is inverted. You have to handle inverted yourself in this case, which is done like so:

    // Get the inverted status of this condition
    var cnd_inverted = this.runtime.getCurrentCondition().inverted;
    
    // ...
    var i, len;
    for(i = 0, len = instances.length; i < len; i++)
    {
         obj = instances[i ]; // forum makes this italic if i don't put a space
         
         // 'xor' handles the invert flag
         if (cr.xor(this.withinAngle(obj.x, obj.y), cnd_inverted))
              picked.push(obj);
    }
    
    if (picked.length)
    {
         sol.select_all = false;
         sol.instances = picked;
         return !cnd_inverted;  // C2 inverts the result
    }
    else
    {
         return cnd_inverted;  // C2 inverts the result
    }
    

    A little explanation:

    XOR computes invert, because of its truth table. See:

    A = object met condition

    B = invert status

    A - B - Result

    0 - 0 - 0

    1 - 0 - 1

    0 - 1 - 1

    1 - 1 - 0

    So if you XOR your picking condition with the invert status, you'll pick it correctly for all combinations of object meeting the condition and condition being inverted. That's what I've done above.

    The next trick is remember C2 inverts the result of your condition function if the condition is inverted. If the event is inverted and we picked no objects, and return false, C2 inverts false to true (because it's inverted) and the event runs. Woops! So to counteract this, the returned value from the condition has to be inverted too. In other words, if nothing was picked, we want to return false if the condition was not inverted, or true if the condition was inverted - i.e., the invert flag itself. And vice versa for if we did pick objects.

    Hopefully that makes sense - once I made those changes to all three conditions, it seems to be working ok now!

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,770,830 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs