Performance question against two scenarios

0 favourites
  • 3 posts
From the Asset Store
Build a thrilling space station scenario with these level assets and characters.
  • Hopefully this is an easy question, but I was curious to see which scenario is better for performance. The objects are sprites.

    In scenario 1, I have 60 sprite objects, with 80 animation frames each, and each sprite object is used once and then the animation frame is set.

    In scenario 2, I have 1 sprite, 80 frames, but the same object is used 60 times. Each animation frame is set per sprite instance.

    I'm thinking that they draw the same either way, right? Meaning, it's still 60 objects being drawn. I just wasn't sure if it's more efficient to draw 1 object 60 times and set the animation frame, or have 60 objects drawn once and then the frame is set. I think the only performance benefit here is maybe not having to increase the file size for the 59 other sprites.

    Just curious to see what others think.

    Thanks!!

  • So in scenario 1 you have 60 different objects (Sprite1, Spire2 etc.), with 80 animation frames each? And in scenario 2 only one object, but 60 instances of it. Is this correct?

    Then scenario 2 is much better! 60 objects will use 60x times more memory than one object. The number of instances doesn't matter much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! This is what I was hoping to confirm! You have the scenarios correct.

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