newt's Recent Forum Activity

  • Sounds like you need to put in a request to have some primitives, other than box in the editor.

    The question is what other primitives would be useful while not taxing the system too much.

    Ashley might say that an octagon would be too much, where something like an iso square would be about the same.

  • I always thought lerp returns a value, not changing a value. I thought it takes A and B, and uses C to pick a spot between the two. Going from 0(A) to 1(B). So if I set lerp(0,100,5*dt) to run every tick, why wouldn't it work? I', sorry if I'm not getting it. If you don't want to explain it anymore, no worries. :)

    I think you're confused about what dt does.

    Dt is the time since the last tick, and will stay the same as long as the frame rate is constant.

    Also you might take a look at the fade behavior.

    Also comparing the last value as a component of time isn't exactly correct, in that it only effects time because of the amount that it adds each tick, IE 5*dt would add less than 20*dt.

  • Because its getting its current opacity, which you change to a percentage of 100 every 5*dt seconds.

    Basically its like saying add n amount to the total every tick, until it gets to 100.

    Self.opacity is the only thing that changes.

    lerp(0,100,5*dt) will always return the same value, just like lerp(0,100,0.5) will always give you 50.

  • Object is just pseudocode I used for the object name. Feel free to use .self if you like.

  • lerp goes off of a percent from 0 to 1, so anything over 1 would be over 100 percent. lerp(0,100,0.5) would give you 50.

    Also using self.opacity as the target doesn't really work here. The only thing that changes in lerp(self.opacity, 100, 5*dt) is the first argument, because the third argument is used as a percent of time, rather than a percent of the target value.

  • try lerp(object.opacity,100,5*dt)

  • Might try overlap at offset.

  • The reason we don't have a circle is because, well there's no such thing as a circle. It's either a bunch of points, which is highly unrecommended, or you use pythag IE distance(), which is not a great idea because it does not pick on its own.

    I would suggest thinking less circle, and more poly, as in hexagon, or perhaps octagon.

  • There's a modified version that can do box collisions:

    http://www.scirra.com/forum/plugin-canvas_topic46006_post325341.html#325341

    Otherwise a dummy sprite should be fairly suitable.

  • If its just an 8x8 pixel image then the Canvas object should be able to handle it all by itself as it is an array all on its own.

    Just remember it uses relative coordinates, and to get a specific color use rgbaAt(x,y).

  • Oid is based on the Object type, while uid is based on the Unique instance.

    You should probably stay away from both, unless you're storing uid in variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Interesting, didn't know z order affected it.

    Yeah as R0J0hound suggested instance variables are the way to go.

    The only other thing you can rely on is the iid, and the order of creation, but just like uid, that can change when you destroy an instance.

newt's avatar

newt

Member since 12 Nov, 2008

Twitter
newt has 27 followers

Trophy Case

  • 16-Year Club
  • Entrepreneur Sold something in the asset store
  • 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
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

31/44
How to earn trophies