Ashley's Recent Forum Activity

  • Forget about performance on individual events like that - it's a waste of time. Rendering a sprite will probably take 100 times as long as whatever difference there is, so it basically doesn't matter at all.

    I'd recommend using conditions in the object instead of conditions from "system" wherever possible, because events generally work better that way (not because of the performance).

  • 1. Boolean instance variable default default value (heh) should probably be 'False'

    Hmm - I guess you're right. Changed for next build.

    . Default image resizing option should probably be stretch instead of 'align top left'

    Not sure about this. Any thoughts from anyone else?

    . I'm not sure if this is even feasible, but the new feature that allows rotating/resizing of multiple sprites at once is practically useless (moving them is fine however). This would be much, much more useful if the sprites all rotated/resized around a common point instead of their respective origins.

    I think different people would have different preferences here... again, interested in any other thoughts. Also, how does resizing around a common point work?

    . Whenever I turn 'snap to grid' on or off, the ribbon hides itself.

    Click the 'pin' in the top right to keep the ribbon there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, 'instanceProto' does not refer to your instance, it prefers to the instance's prototype. You can store data to it because javascript allows you to store data in any object, but it is a different object to your actual instance. It's sort of the object the instance 'inherits' methods from. More on prototypes - it's a really weird part of javascript, took me a while to get my head round it myself.

    I think in your first example 'this' is actually just the global scope, because

    socket.onmessage = function (e)
    {
        this.foo = 5;
    }

    is basically equivalent to

    function temp(e)
    {
        this.foo = 5;
    }
    socket.onmessage = temp;

    where it's more obvious that 'this' does not refer to anything. A good example of the solution is the Mouse object, which attaches a function to mousedown that uses a closure to permanently reference 'this' from the calling scope:

         jQuery(document).mousedown(
              (function (self) {
                   return function(info) {
                        // this is the real function - 
                        // use 'self' instead of 'this'
                        self.onMouseDown(info);
                   };
              })(this)
         );

    It's a bit fiddly syntax, but that is the correct solution. As you can see it's easiest just to call another function so you can use a real 'this' instead of keeping using 'self'.

  • I'm not sure this can be fixed... by design if you leave a browser window open and press Preview, Construct 2 will refresh that window instead of opening a new window. If you change the preview browser and preview, then close it while leaving the old browser window open, Construct 2 can't tell whether it should launch a new browser window or refresh the currently open window.

    It was tricky to get Construct 2 to refresh an existing browser window, and the method it uses to do that is browser neutral (i.e. doesn't take in to account different browsers). So I think it might have to stay as a quirk. I suppose just remember you close browser windows before switching preview browser.

  • Please see how to report bugs, we usually cannot do anything about bugs without a .capx file.

  • Ah, I see. There was a quirk in the order layouts are initialised in. For the first tick it did indeed have the last time's view position. It should be fixed for next build.

  • Could you try upgrading to IE9 since you're on Win7 and let me know if that fixes it?

  • Nice idea! I might steal a few of these...

  • Armitage1982, I'm not sure what your question was from your last post. Could you clarify what you were asking?

    Javascript can be coded in an object oriented style if you choose, just because the language doesn't have the keyword 'class' doesn't mean you can't. And I already mentioned javascript is compiled to machine code these days so is pretty fast, although obviously not as good as C++. Performance varies depending on your machine and browser so you should just try stuff out to see if it's fast enough for your purposes.

  • Yeah, a couple of features to make this easier has been on our todo list for a while now. Just been so much other stuff to do.

  • Do you have a reliable repro? I don't really know what to do if I have to spend 15 minutes editing to see the problem...

  • domfont - your second bug with wrong collisions should be fixed in the next build (r76).

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,773,133 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