Construct 3 r198

You're viewing a single comment in a conversation. View all the comments
  • 6 Comments

  • Order by
  • New "Sprite: expressions", does such things add overall for sprite performance, increased memory usage if sprites has 10+ poly points?

    And c3runtime did got update some time ago to lower memory usage, as it uses new method for memory save, when you don't use some features it does not cost memory. Then if some sprite expressions/settings are never used, it will not impact memory, but if i use it for once it will add a bit extra memory overall? Is it still like this, or it was only for scripting?

      • [-] [+]
      • 1
      • Ashley's avatar
      • Ashley
      • Construct Team Founder
      • 1 points
      • (4 children)

      I'm not quite sure what you mean. But if you are wondering what the performance or memory usage impact of something is, measure it. That's the only real answer.

      • Anyway it's more wider topic, but to make it simple and which i know:

        "features that are not used do not allocate memory"

        "things like instance variables, behaviors and effects do not allocate memory unless they are actually used"

        Does this also applies to new sprite expression.

        From this: does it applies to imagePoints?If i got 1000 copys of 1 sprite with 10 imagepoint, and i only use 10 imagepoints on 5 copys, will it impact all copys? Same for instance var, will it allocate memory for all instances or just thous sprite copys which i use instance vars on?

        Just my random thought!

          • [-] [+]
          • 1
          • Ashley's avatar
          • Ashley
          • Construct Team Founder
          • 1 points
          • (2 children)

          If it doesn't need to, it doesn't. Sprites don't need their own copies of the collision polygons, so they don't make copies. Instances that don't use instance variables don't need to allocate anything for them, so they don't. This is basic software design stuff, if it did that it would be senselessly inefficient.

          • Wondering one more thing.

            If I make huge randomly generated layout, but in this case i set and access each object multiple times. So for generating phase it allocates everything because everything could be checked at start, does C3 also deallocates when it is not used for sometime?

              • [-] [+]
              • 1
              • Ashley's avatar
              • Ashley
              • Construct Team Founder
              • 1 points
              • (0 children)

              I can't answer questions like this, it just seems too vague. What exactly is this hypothetical project doing? As before, you can get a precise answer by making a project, and measuring it.