On Jan 18, 2:49 pm, Andre <andranik.abra...@gmail.com> wrote: > Let me clarify... > > Lets look at two methods: > - updateAsteroidsPhysics() > - drawAsteroids(Canvas canvas) > They both use getters instead of members, and asteroids[i] instead of > asteroid variable, the only difference between them, that drawAsteroids > (Canvas canvas) is also use canvas calls, and I think this is most > heavy part, becouse: > > updateSpaceshipPhysics(); > updateAsteroidsPhysics(); > updateBulletsPhysics(); > checkForCollisions(); > > takes ~1-5ms to perform, and: > > drawSpaceship(canvas); > drawAsteroids(canvas); > drawBullets(canvas); > > takes ~25ms to perform (and even more, if I increase number of > asteroids or start to fire bullets)
yes, i know, thats why you should optimize your draw*(Canvas) methods. now, after changes, do you see any changes in FPS? pskink
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en