Animations and CPU - best practice?
I am developing a game with a few Animation
s running in infinite loops (live background - think of the home screen of Angry Birds). However, very quickly the app consumes 90% or more of my CPU (Nexus One /开发者_JS百科 Froyo). These are very simple translation animations applied to ImageView
s. Game development is novel to me, and I was wondering if there were best practices to avoid such CPU overload. Is the Animation
object known to be expensive? Would direct bitmap drawing on the canvas be better suited?
Thanks in advance,
Michael
Use OpenGL directly. Using Animation is sitting you on top of a full view system doing a lot more than you need for doing a game-like experience.
精彩评论