Impact of "Sprite animation" on app performance

I have a question about how the “sprite animations” works in composer scene. I have animated buttons that appears in 18 scenes which are created in the “create scene”, to play I use “scene show” and “scene hide” to pause it. In “scene destroy” I send the sequence data to nil since the animated object is inserted into the scene group.
I have noticed that the animation is paused in every scene but when I come back it continues where it left off, it doesn’t begin in frame 1 as I expected.
I am concerned about the impact it could have to memory and battery performance.

Could it significantly affect the App performance?

  1. You can reset to frame 1, or any other frame for that matter: https://docs.coronalabs.com/api/type/SpriteObject/setFrame.html

It is correct that is starts where it left off.  You do need to reset to frame 1 if that is what  you’re expecting to see.

  1. As long as you stop the animations when the scene is hidden, the battery consumption should be fine.

  2.  re: memory: If,

  • the animation uses a single 4K or smaller sheet.
  • the same image / texture buffer is used for all the buttons.  (This is automatic, so loading the same sheet in multiple scenes will already using the same image / texture buffer.  i.e. Corona should naturally load the texture once and only once for as long as it is in use and not flushed.
  • the animation doesn’t have a ridiculous number of frames running beyond a reasonable rate equivalent to  30FPS.
  • … 

It should be fine.

PS - This isn’t a very scientific or event technologically correct answer, but the gist is.  As long as the animation is reasonably designed it will be very efficient and not waste memory or energy.

If anyone out there wants to give a more thorough answer, please do.  I need a refresher on the underlying technology.

Battery Consumption:

https://thenextweb.com/dd/2013/08/05/how-to-minimize-your-mobile-apps-power-consumption/#.tnw_W8vdenYy

[quote=“roaminggamer,post:2,topic:344245”]

  1. You can reset to frame 1, or any other frame for that matter: https://docs.coronalabs.com/api/type/SpriteObject/setFrame.html

It is correct that is starts where it left off. You do need to reset to frame 1 if that is what you’re expecting to see.

  1. As long as you stop the animations when the scene is hidden, the battery consumption should be fine.

  2. re: memory: If,

  • the animation uses a single 4K or smaller sheet.
  • the same image / texture buffer is used for all the buttons. (This is automatic, so loading the same sheet in multiple scenes will already using the same image / texture buffer. i.e. Corona should naturally load the texture once and only once for as long as it is in use and not flushed.
  • the animation doesn’t have a ridiculous number of frames running beyond a reasonable rate equivalent to 30FPS.

  • It should be fine.

PS - This isn’t a very scientific or event technologically correct answer, but the gist is. As long as the animation is reasonably designed it will be very efficient and not waste memory or energy.

If anyone out there wants to give a more thorough answer, please do. I need a refresher on the underlying technology. [/quote]

My mind is very clear now. Thanks!

  1. You can reset to frame 1, or any other frame for that matter: https://docs.coronalabs.com/api/type/SpriteObject/setFrame.html

It is correct that is starts where it left off.  You do need to reset to frame 1 if that is what  you’re expecting to see.

  1. As long as you stop the animations when the scene is hidden, the battery consumption should be fine.

  2.  re: memory: If,

  • the animation uses a single 4K or smaller sheet.
  • the same image / texture buffer is used for all the buttons.  (This is automatic, so loading the same sheet in multiple scenes will already using the same image / texture buffer.  i.e. Corona should naturally load the texture once and only once for as long as it is in use and not flushed.
  • the animation doesn’t have a ridiculous number of frames running beyond a reasonable rate equivalent to  30FPS.
  • … 

It should be fine.

PS - This isn’t a very scientific or event technologically correct answer, but the gist is.  As long as the animation is reasonably designed it will be very efficient and not waste memory or energy.

If anyone out there wants to give a more thorough answer, please do.  I need a refresher on the underlying technology.

Battery Consumption:

https://thenextweb.com/dd/2013/08/05/how-to-minimize-your-mobile-apps-power-consumption/#.tnw_W8vdenYy

[quote=“roaminggamer,post:5,topic:344245”]

  1. You can reset to frame 1, or any other frame for that matter: https://docs.coronalabs.com/api/type/SpriteObject/setFrame.html

It is correct that is starts where it left off. You do need to reset to frame 1 if that is what you’re expecting to see.

  1. As long as you stop the animations when the scene is hidden, the battery consumption should be fine.

  2. re: memory: If,

  • the animation uses a single 4K or smaller sheet.
  • the same image / texture buffer is used for all the buttons. (This is automatic, so loading the same sheet in multiple scenes will already using the same image / texture buffer. i.e. Corona should naturally load the texture once and only once for as long as it is in use and not flushed.
  • the animation doesn’t have a ridiculous number of frames running beyond a reasonable rate equivalent to 30FPS.

  • It should be fine.

PS - This isn’t a very scientific or event technologically correct answer, but the gist is. As long as the animation is reasonably designed it will be very efficient and not waste memory or energy.

If anyone out there wants to give a more thorough answer, please do. I need a refresher on the underlying technology. [/quote]

My mind is very clear now. Thanks!