Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem is that my java app contains too many animated sprites and it runs very slowly on android system.

Does the usage of .gif animation instead of sprite animation will improve the speed?
I really don't know which animation technique consume less CPU time.

share|improve this question

closed as not constructive by Le Comte du Merde-fou, bummzack, doppelgreener, Byte56, Sean Middleditch Mar 4 '13 at 17:36

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Can you provide us some additional information on how you're displaying sprites? For example, are you using SurfaceView? Are you using RGB_565 for sprites? ARGB_4444? Are you using pooling and recycling techniques? – Cameron Fredman Mar 3 '13 at 1:42
In a main app loop I check for the delay between frames and post a part of a ARGB sprite sheet onto a surfaceView. – qvatra Mar 3 '13 at 2:09
What you're really asking is how to optimize graphics performance on Android. It's a big topic and there are many things you can do, but using a gif is not going to solve all your problems. – Cameron Fredman Mar 3 '13 at 2:22
true but using gifs I don't have a connection of gif's speed with the java code, right? The question is still: will gifs improve a speed of the app or not? – qvatra Mar 3 '13 at 2:32
Grab a profiler and see what it tells you. There's no substitute for that. – ashes999 Mar 3 '13 at 3:24
up vote 0 down vote accepted

Whether you are able to render .gifs acceptable for your needs (frame timing, alpha channel) or not? It all depends on implementation. But the resulting app's size will not be reduced, if the device's memory is a considerable bottleneck.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.