Relating to Instances and Actives

This forum is currently in read-only mode.
From the Asset Store
This is a puzzle game about marine animals and other characters related to sea.
  • How does Construct tell the difference between instances of an active?

    Is it just like TGF's rather poor method of using Spread Values and the collide with another object semi-automatic way that you must design your whole code around (depending upon the use) or does it have several or at least one better method?

    I'm also curious about the active limit. I remember reading something somewhere saying that Construct has an unlimited amount of actives available and without any slow-down, is this true?

    If it is, then that means Instances are less needed, and if I wanted to, I could just code the whole game according to each seperate active object, using as many as I need to, correct?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • active

    Sprite.

    Construct tells them apart by using conditions to filter only the instances that met the event.

    [quote:1ol6augh]Is it just like TGF's rather poor method of using Spread Values

    You rarely, if ever, need to use spread values in Construct - have a look at the 'For Each Object' condition.

    [quote:1ol6augh]collide with another object semi-automatic way that you must design your whole code around

    I don't understand this, what's the specific problem you are talking about? Hazarding a guess, you might be interested in the advanced collision system condition, which allows you to choose which objects involved in the collision get picked in the event.

    [quote:1ol6augh]I remember reading something somewhere saying that Construct has an unlimited amount of actives available and without any slow-down, is this true?

    It's true that Construct supports an unlimited number of sprites, and you don't need to specify any limit. However, if you're drawing them all on the screen, there will of course be a slowdown. Construct isn't magic, if you have twice as many objects, it'll probably take twice as long to draw them all! We've worked hard to try and make it as fast as possible, though.

    [quote:1ol6augh]if I wanted to, I could just code the whole game according to each seperate active object, using as many as I need to, correct?

    I don't really understand... you want to code each instance separately? I wouldn't advise that. The best way to go is to use ordinary objects, use Families to group together the related ones (like Friendly and Enemy), and code your events around the families. You can use event sheet includes to have your family events affect the entire game, and it saves you repeating events.

  • [quote:footjzyp]I remember reading something somewhere saying that Construct has an unlimited amount of actives available and without any slow-down, is this true?

    Depending on what graphics card you have, and what you're doing with the sprites, you could have several hundred sprites moving around on the screen without any slowdown.

    Physics will slow things down with hundreds of objects colliding at once, because it's mathematically CPU intensive. As will calculating collision between normal sprites several hundred times per tick (as in with a loop).

    Heavy use of shaders, motion blur, large amounts of particles, etc. will cause slowdown on some graphics cards because they're very GPU intensive. The Plasma object will as well for some people. Be frugal with your effects. Try to fake it as much as you can by creating effects on your sprites before importing them into Construct whenever you're able to.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)